PHPWebSocket-Chat
PHPWebSocket-Chat copied to clipboard
No works in one tab!
the functions on fancywebsocket.js no works when just one window is open, but when more than one window is open (browser) run normally.
the trouble is in server.php
if ( sizeof($Server->wsClients) == 1 ) $Server->wsSend($clientID, ""); ## this part reaplace with this : foreach ( $Server->wsClients as $id => $client ) $Server->wsSend($id,$message);
or otherway just take off the if statment if ( sizeof($Server->wsClients) == 1 ) in line 21. i works with a software restaurant and when another socket is not open the functions inside were not running, and doing this change all go fine! 😄
@why don't you suggest your idea or become contributing