프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$default_wait_time | integer | Default socket wait time in seconds. |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_address | string | Socket Address | |
$_clients | array | Client sockets currently connected for read/write. | |
$_connection | object | Socket connection object | |
$_options | Options used for the socket. |
메소드 | 설명 | |
---|---|---|
__construct ( string $address, string $options = [] ) : void | Constructs a new socket. | |
get_connections ( ) : array | Returns the currently connected clients. | |
on_connect ( callable $function ) : object | Registers a new handle for new client connections. | |
on_disconnect ( callable $function ) : object | Registers a new handle for disconnections. | |
on_error ( callable $function ) : object | Registers a new handle for socket connection errors. | |
on_read ( callable $function ) : object | Registers a new handle for client read. | |
on_write ( callable $function ) : object | Registers a new handle for client write. | |
reconnect ( ) : void | Reconnects the socket. | |
routine ( |
Registers the idle process. |
메소드 | 설명 | |
---|---|---|
_connect ( ) : void | Establishes the socket connection. |
public get_connections ( ) : array | ||
리턴 | array |
public on_connect ( callable $function ) : object | ||
$function | callable | Function to call on connect. |
리턴 | object |
public on_disconnect ( callable $function ) : object | ||
$function | callable | Function to call on connect. |
리턴 | object |
protected array $_clients | ||
리턴 | array |
public int $default_wait_time | ||
리턴 | integer |