Property | Type | Description | |
---|---|---|---|
$onConnect | callback | Emitted when socket connection is successfully established. | |
$transport | string | Transport layer protocol. |
Property | Type | Description | |
---|---|---|---|
$_builtinTransports | array | PHP built-in protocols. | |
$_connectStartTime | string | Connect start time. | |
$_contextOption | resource | Context option. | |
$_reconnectTimer | integer | Reconnect timer. | |
$_remoteHost | string | Remote host. | |
$_remoteURI | string | Remote URI. | |
$_status | integer | Status. |
Method | Description | |
---|---|---|
__construct ( string $remote_address, array $context_option = null ) | Construct. | |
checkConnection ( resource $socket ) : void | Check connection is successfully established or faild. | |
connect ( ) : void | Do connect. | |
getRemoteHost ( ) : string | Get remote address. | |
getRemoteURI ( ) : string | Get remote URI. | |
reConnect ( integer $after ) : void | Reconnect. |
Method | Description | |
---|---|---|
emitError ( integer $code, string $msg ) : void | Try to emit onError callback. |
public __construct ( string $remote_address, array $context_option = null ) | ||
$remote_address | string | |
$context_option | array |
public checkConnection ( resource $socket ) : void | ||
$socket | resource | |
return | void |
protected static array $_builtinTransports | ||
return | array |
protected string $_connectStartTime | ||
return | string |
protected resource $_contextOption | ||
return | resource |
protected int $_reconnectTimer | ||
return | integer |
public callback $onConnect | ||
return | callback |