stream_set_blocking
(PHP 4 >= 4.3.0, PHP 5, PHP 7)
stream_set_blocking — 为资源流设置阻塞或者阻塞模式
说明
   stream_set_blocking
    ( resource 
  $stream
   , int $mode
   ) : bool
   为 stream 设置阻塞或者阻塞模。
  
此函数适用于支持非阻塞模式的任何资源流(常规文件,套接字资源流等)。
参数
返回值
   成功时返回 TRUE, 或者在失败时返回 FALSE。
  
更新日志
| 版本 | 说明 | 
|---|---|
| 4.3.0 | 在PHP 4.3.0之前,该函数只支持套接字资源流。 | 
注释
Note:
该函数之前叫作 set_socket_blocking() 后来又叫做 socket_set_blocking() ,但是这种用法都已经被废弃。
参见
- stream_select() - Runs the equivalent of the select() system call on the given arrays of streams with a timeout specified by tv_sec and tv_usec