I am having a problem with socket_read(). Socket_read wants a secound parm to tell it how much data to read. The problem is that there is no fixed amount. I want it to read as much as there is to read. I have tried putting 0 and not including that parm, it just complains and fails.
Is there any way I can just read until there is no more data?
I have this: $message = socket_recv($spawn, $message);
but get this:
Warning: socket_recv() expects exactly 4 parameters, 2 given in /opt/SocketServer.php on line 125
If I supply a len, isn't it just going to chop like the other function?
I'm sorry that it's not much, but I'm curious to see how the length is altered by that flag(since it's completely undocumented), and I don't have the tools to test it myself for a little while(not on any of my machines and I don't think my neighbour will like me installing strange stuff on her's when I'm supposed to be fixing it).
If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
The same applies to HTML and the forums [HTML][/HTML] tags.
Bookmarks