this function, compared to the function socket_accept, got an extra argument "timeout".To make this function wait indefinitelly to incoming connections, just as in socket_accept, set timeout to -1. It works for me with PHP 5.0.4.

To whom it may concern, and it may concern you greatly, stream_set_blocking has no effect on stream_socket_accept.If you want it to return right away, connection or not, use 0 for the timeout parameter.