English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The PHP socket set blocking() function sets blocking or blocking mode for resource streams
bool stream_set_blocking ( resource $stream , int $mode )
It is an alias for STREAM_SET_BLOCKING(), which has blocking or unblocking options for stream mode.
Returns true on success, otherwise returns false
Serial number | Parameters and descriptions |
---|---|
1 | stream Resource stream |
2 | mode If mode is 0, the resource stream will be converted to non-blocking mode; if it is 1, the resource stream will be converted to blocking mode. The setting of this parameter will affect functions like fgets() and fread() that read data from the resource stream. In non-blocking mode, calling fgets() always returns immediately; in blocking mode, it will wait until data is obtained from the resource stream before returning. |