phpday 2027 - Call for Papers

The StreamPollHandle class

(PHP 8 >= 8.6.0)

Introducción

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.

Sinopsis de la clase

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

Tabla de contenidos

+add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top