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