PHP Classes

Add a method to change the type of socket_read?

Recommend this page to a friend!

      Socket Server  >  All threads  >  Add a method to change the type of...  >  (Un) Subscribe thread alerts  
Subject:Add a method to change the type of...
Summary:Can't receive ASCII characters
Messages:2
Author:Andy.L
Date:2009-10-26 02:29:29
Update:2009-10-26 16:40:59
 

  1. Add a method to change the type of...   Reply   Report abuse  
Picture of Andy.L Andy.L - 2009-10-26 02:29:29
I found a piece of hard code at line 480 where you use PHP_NORMAL_READ as the default parameter for socket_read. If I send some ASCII characters to my server, the handle method won't be called any more. After I remove the '@' character before socket_read a warning message shown below:
PHP Warning: socket_read(): unable to read from socket [104]: Connection reset by peer.
Change the type from PHP_NORMAL_READ to PHP_BINARY_READ, everything is OK.
So, I suggest to add a method to change the type of socket_read.

  2. Re: Add a method to change the type of...   Reply   Report abuse  
Picture of Aleksey V. Zapparov Aleksey V. Zapparov - 2009-10-26 16:40:59 - In reply to message 1 from Andy.L
Hello.

Thank you for your reply. I forgot about this thing. I'll fix it soon. So there will be ability to change read mode.

 
For more information send a message to info at phpclasses dot org.