PHPWebSocket-Chat icon indicating copy to clipboard operation
PHPWebSocket-Chat copied to clipboard

No works in one tab!

Open jona950 opened this issue 6 years ago • 2 comments

the functions on fancywebsocket.js no works when just one window is open, but when more than one window is open (browser) run normally.

jona950 avatar Aug 27 '18 18:08 jona950

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! 😄

jona950 avatar Aug 27 '18 19:08 jona950

@why don't you suggest your idea or become contributing

aacassandra avatar Sep 04 '18 09:09 aacassandra