PHP Classes

buff empty?

Recommend this page to a friend!

      Web Socket Service  >  All threads  >  buff empty?  >  (Un) Subscribe thread alerts  
Subject:buff empty?
Summary:buff seems to be empty.
Messages:1
Author:Kristjan Adojaan
Date:2013-08-28 08:29:52
 

  1. buff empty?   Reply   Report abuse  
Picture of Kristjan Adojaan Kristjan Adojaan - 2013-08-28 08:29:52
When I start example.php from php command it is started successfully
[08/28/2013 11:22:28]9702 : Creating WebSocket
[08/28/2013 11:22:28]9702 : Configuring WebSocket
[08/28/2013 11:22:28]9702 : Binding WebSocket
[08/28/2013 11:22:28]9702 : Listening on WebSocket
[08/28/2013 11:22:28]9702 : Setting WebSocket to non-blocking
[08/28/2013 11:22:28]9702 : Server Started
[08/28/2013 11:22:28]9702 : Listening on: 0.0.0.0 port 2595
[08/28/2013 11:22:28]9702 : Master socket: Resource id #6

But I get problems when opening sample chatroom. Chatroom displays Not connected to server and console in server displays endless loop:

[08/28/2013 11:22:54]9704 : Successfully forked process!
[08/28/2013 11:22:54]9704 : WebClient: Connection accepted for: 192.168.0.68:52426
[08/28/2013 11:22:54]9704 : WebClient: Client is version 13, proceeding to handshake...

I tried to track the error, adding some additional debug to WebClientService (the latest place where Looks like client is disconnected).
just after $l = socket_recv($this->socket, $buff, 2048, MSG_DONTWAIT) that displays:

[08/28/2013 11:22:54]9704 : l is 0 and this-socket is Resource id #7 and buff is and msg_dontwait is 64
[08/28/2013 11:22:54]9704 : WebClient7: Looks like client 'Resource id #7' disconnected with last_error 0 and l 0!
[08/28/2013 11:22:54]9704 : WebClient: Closing socket Resource id #7
[08/28/2013 11:22:54]9704 : Closing process: 9704
[08/28/2013 11:22:54]9702 : Getting data from child
[08/28/2013 11:22:54]9702 : Removed zombie: 9704
[08/28/2013 11:22:54]9705 : Successfully forked process!

I didn't actually get, where the $buff should get its value?