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 Description |
---|---|
1 | stream resource stream |
2 | mode If mode is 0, the resource stream will be converted to non-blocking mode; if it is1, 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() will always return immediately; while in blocking mode, it will wait until data is obtained from the resource stream before returning. |