EventListener
final class EventListener (View source)
EventListener.
Represents a connection listener.
Constants
OPT_LEAVE_SOCKETS_BLOCKING |
|
OPT_CLOSE_ON_FREE |
|
OPT_CLOSE_ON_EXEC |
|
OPT_REUSEABLE |
|
OPT_THREADSAFE |
|
OPT_DISABLED |
|
OPT_DEFERRED_ACCEPT |
|
Properties
int | $fd |
Methods
__construct(EventBase $base, callable $cb, mixed $data, int $flags, int $backlog, mixed $target)
__construct.
bool
disable()
disable.
bool
enable()
enable.
void
free()
No description
void
getBase()
getBase.
static bool
getSocketName(string $address, int $port)
getSocketName.
void
setCallback(callable $cb, mixed $arg = null)
setCallback.
void
setErrorCallback(string $cb)
setErrorCallback.
Details
__construct(EventBase $base, callable $cb, mixed $data, int $flags, int $backlog, mixed $target)
__construct.
Creates new connection listener associated with an event base.
bool
disable()
disable.
Disables an event connect listener object.
bool
enable()
enable.
Enables an event connect listener object.
void
free()
No description
void
getBase()
getBase.
Returns event base associated with the event listener.
static bool
getSocketName(string $address, int $port)
getSocketName.
Retreives the current address to which the listener's socket is bound.
void
setCallback(callable $cb, mixed $arg = null)
setCallback.
The setCallback purpose.
void
setErrorCallback(string $cb)
setErrorCallback.
Set event listener's error callback.