aximbigfan Posted August 10, 2008 Share Posted August 10, 2008 Hi, I have a PHP socket server I wrote. in the server, socket_read() is obviously going to be used alot. The trouble is that socket_read wants to have a point at which it will stop reading. How can I have it just read until the stream ends? I have tried putting 0 in that argument, to no effect. Thanks, Chris Link to comment https://forums.phpfreaks.com/topic/119005-socket_read-forever/ Share on other sites More sharing options...
genericnumber1 Posted August 10, 2008 Share Posted August 10, 2008 Take a look at socket_listen() http://us.php.net/socket_listen That might be what you're looking for. If it's not, try looking at the alternatives for reading ends... http://us.php.net/manual/en/function.socket-read.php \r \n \0 depending on the read type. Link to comment https://forums.phpfreaks.com/topic/119005-socket_read-forever/#findComment-612791 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.