Beware, when using this function within a loop (i.e. a demon with a socket). The socket_accept(), for example, emits a warning each time there is no incoming connection available to be read. My php error log file got huge in a matter of seconds, eventually crashing the server.
Of course, i used the @ before the function to take care of that problem.
[EDITOR: One can (and should) use socket_select to detect a new connection on a socket (it's a "readable" event)]
socket_set_nonblock
(PHP 4 >= 4.1.0, PHP 5)
socket_set_nonblock — Configura o modo nonblocking para o arquivo de descrição fd
Descrição
bool socket_set_nonblock
( resource
$socket
)Aviso
Esta função é EXPERIMENTAL. O comportamento desta função, seu nome, incluindo toda documentação pode ser modificado sem aviso em futuras versões do PHP. Esta função deve ser usada por sua própria conta e risco.
Aviso
Esta função não está documentada; somente a lista de argumentos está disponível.
kpobococ at gmail dot com ¶
3 years ago
