socket_set_block

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

socket_set_block Configura o modo bloqueio em um socket resource

Descrição

socket_set_block ( resource $socket ) : bool
Aviso

Esta função não está documentada; somente a lista de argumentos está disponível.

Retorna true em caso de sucesso ou false em caso de falha.

Veja também socket_set_nonblock() e socket_set_option()

add a note add a note

User Contributed Notes 1 note

up
2
laacz at laacz dot lv
9 years ago
Besides true and false socket_set_block might return NULL if you're not too careful. That would happen when passing non socket resource as first parameter.

E.g. socket_set_block(false)) would return NULL and emit warning that you're trying to do things with non-socket.
To Top