This is automatic generated document for things in Swow namespace

NPROC_AVAILABLE = 0

Function defer

function defer ( callable $tasks ) : void

Function fileno

function fileno ( resource $stream ) : (int | null)

get the file descriptor of a stream

Param resource $stream the stream to get the file descriptor of, must be a PHP stream resource

Throws \Swow\Exception when failed to get the file descriptor

Function nproc

function nproc ( int $kind ) : int

get Number of PROCessors

Param int $kind processors count kind, currently only support Swow\NPROC_AVAILABLE which means the number of available (i.e. online logical cores) processors

Throws \Swow\Exception when failed to get the number of processors

Function pipe

function pipe ( int $rflags , int $wflags ) : (array{0: resource, 1: resource} | null)

create a pipe pair like pipe(2)

Param int $rflags read end flags, default is 0 Param int $wflags write end flags, default is 0

Returns (array{0: resource, 1: resource} | null) the first element is the read end, the second element is the write end

Throws \Swow\Exception when failed to create pipe

Function pipe_from_fd

function pipe_from_fd ( int $fd , string $mode ) : resource

create a pipe from a file descriptor

Param int $fd the file descriptor to create a pipe from Param string $mode the mode of the pipe, must be r or w

Returns resource the pipe resource

Throws \Swow\Exception when failed to create a pipe

Classes

Class Buffer

Class BufferException

Class CallException

Class Channel

Class ChannelException

Class Coroutine

Class CoroutineException

Class Defer

Class Errno

Class Exception

Class Extension

Class IpAddress

Class IpAddressException

Class Library

Class Log

Class Selector

Class SelectorException

Class Signal

Class SignalException

Class Socket

Class SocketException

Class SyncException

Class Watchdog

Class WatchdogException


Table of contents


Copyright 2022 the Swow contributors