This is automatic generated document for things in \ namespace

STREAM_POLLERR = 8 STREAM_POLLHUP = 16 STREAM_POLLIN = 1 STREAM_POLLNONE = 0 STREAM_POLLNVAL = 32 STREAM_POLLOUT = 4 STREAM_POLLPRI = 2

Function gethostbyname2

function gethostbyname2 ( string $hostname , int $address_family ) : string

Resolve a host name to an IP address.

Returns string the resolved address

Throws \RuntimeException when the name does not resolve. The code is a negative EAI code.

Function msleep

function msleep ( int $milli_seconds ) : int

sleep milliseconds

Param int $milli_seconds time to sleep, in ms

Returns int always 0

Throws \ValueError when the value is negative

Function stream_poll_one

function stream_poll_one ( resource $stream , int $events , int $timeout ) : int

poll one stream for events

Param resource $stream stream resource Param int $events flags: STREAM_POLL* constants combinations

Returns int flags: STREAM_POLL* constants combinations, STREAM_POLLNONE means timeout. The result can contain STREAM_POLLHUP and STREAM_POLLERR.

Throws RuntimeException on runtime error, e.g. poll has been cancelled or poll failed

Function stream_select_unlimited

function stream_select_unlimited ( array<resource> & $read , array<resource> & $write , array<resource> & $except , (int | null) $seconds , (int | null) $microseconds ) : (int | false)

unlimited version of stream_select()

Returns (int | false) number of stream resources that are ready for reading, writing, or have an error, or false on error

Throws \ValueError when no valid stream remains in the arrays

Classes

Class Swow


Table of contents


Copyright 2022 the Swow contributors