phpday 2027 - Call for Papers

The StreamPollHandle class

(PHP 8 >= 8.6.0)

简介

An Io\Poll\Handle that allows a stream to be watched by an Io\Poll\Context.

Only streams that are backed by a file descriptor of the operating system can be polled, such as sockets and pipes. Which kinds of streams are accepted depends on the backend: for example, Io\Poll\Backend::WSAPoll only accepts sockets, and Io\Poll\Backend::Epoll rejects regular files.

Objects of this class cannot be cloned or serialized.

类摘要

final class StreamPollHandle implements Io\Poll\Handle {
/* 方法 */
public function __construct(resource $stream)
public function getStream(): resource
public function isValid(): bool
}

目录

+添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top