final class EventUtil (View source)

EventUtil.

EventUtil is a singleton with supplimentary methods and constants.

Constants

AF_INET

AF_INET6

AF_UNIX

AF_UNSPEC

LIBEVENT_VERSION_NUMBER

SO_DEBUG

SO_REUSEADDR

SO_KEEPALIVE

SO_DONTROUTE

SO_LINGER

SO_BROADCAST

SO_OOBINLINE

SO_SNDBUF

SO_RCVBUF

SO_SNDLOWAT

SO_RCVLOWAT

SO_SNDTIMEO

SO_RCVTIMEO

SO_TYPE

SO_ERROR

SOL_SOCKET

SOL_TCP

SOL_UDP

SOCK_RAW

TCP_NODELAY

IPPROTO_IP

IPPROTO_IPV6

Methods

__construct()

__construct.

resource
createSocket(mixed $socket)

No description

static int|false
getLastSocketErrno(mixed $socket = null)

getLastSocketErrno.

static string|false
getLastSocketError(mixed $socket)

getLastSocketError.

static int
getSocketFd(mixed $socket)

getSocketFd.

static bool
getSocketName(mixed $socket, string $address, int $port)

getSocketName.

static bool
setSocketOption(mixed $socket, int $level, int $optname, int|array $optval)

setSocketOption.

static bool
sslRandPoll()

sslRandPoll.

Details

abstract __construct()

__construct.

The abstract constructor.

resource createSocket(mixed $socket)

No description

Parameters

mixed $socket

Return Value

resource

static int|false getLastSocketErrno(mixed $socket = null)

getLastSocketErrno.

Returns the most recent socket error number.

Parameters

mixed $socket

= null

Return Value

int|false

See also

https://secure.php.net/manual/en/eventutil.getlastsocketerrno.php

static string|false getLastSocketError(mixed $socket)

getLastSocketError.

Returns the most recent socket error.

Parameters

mixed $socket

Return Value

string|false

See also

https://secure.php.net/manual/en/eventutil.getlastsocketerror.php

static int getSocketFd(mixed $socket)

getSocketFd.

Returns numeric file descriptor of a socket, or stream.

Parameters

mixed $socket

Return Value

int

See also

https://secure.php.net/manual/en/eventutil.getsocketfd.php

static bool getSocketName(mixed $socket, string $address, int $port)

getSocketName.

Retreives the current address to which the socket is bound.

Parameters

mixed $socket
string $address
int $port

Return Value

bool

See also

https://secure.php.net/manual/en/eventutil.getsocketname.php

static bool setSocketOption(mixed $socket, int $level, int $optname, int|array $optval)

setSocketOption.

Sets socket options.

Parameters

mixed $socket
int $level
int $optname
int|array $optval

Return Value

bool

See also

https://secure.php.net/manual/en/eventutil.setsocketoption.php

static bool sslRandPoll()

sslRandPoll.

Generates entropy by means of OpenSSL's RAND_poll().