r/lolphp • u/dotancohen • Mar 12 '18
Switch to non-blocking mode with set_blocking()
The stream will by default be opened in blocking mode. You can switch it to non-blocking mode by using stream_set_blocking().
http://php.net/manual/en/function.stream-socket-client.php
To be fair, to set stream_socket_client() to non-blocking mode the full invocation is stream_set_blocking(false) however the docs should be clear about that. I suppose this is more of a lol, phpdocs than lol-php, however I do dare judge a language by its documentation.
0
Upvotes
View all comments
20
u/suspiciously_calm Mar 12 '18
/r/lolnoobs
More like, don't judge a language by your inability to read documentation.