phpday 2027 - Call for Papers

Input/Output

简介

The classes of the Io namespace provide a polling API: a way to wait until one of many streams is ready for reading or writing, using the polling mechanism of the operating system. It is intended for programs that handle many connections at once, such as servers and event loops.

The handles to watch are registered with an Io\Poll\Context, which returns an Io\Poll\Watcher for each of them. Io\Poll\Context::wait() then blocks until some of the watchers are triggered. Streams are wrapped in a StreamPollHandle to be watched.

These classes are part of the PHP core and are always available.

+添加备注

用户贡献的备注

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