Свойство | Тип | Описание | |
---|---|---|---|
$onConnect | callback | Emitted when socket connection is successfully established. | |
$transport | string | Transport layer protocol. |
Свойство | Тип | Описание | |
---|---|---|---|
$_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. |
Метод | Описание | |
---|---|---|
__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. |
Метод | Описание | |
---|---|---|
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 | |
Результат | void |
public getRemoteHost ( ) : string | ||
Результат | string |
protected static array $_builtinTransports | ||
Результат | array |
protected string $_connectStartTime | ||
Результат | string |
protected resource $_contextOption | ||
Результат | resource |
protected int $_reconnectTimer | ||
Результат | integer |
public callback $onConnect | ||
Результат | callback |