프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |
protected static array $_builtinTransports | ||
리턴 | array |
public callback $onConnect | ||
리턴 | callback |