PHP Class Workerman\Connection\AsyncTcpConnection

Inheritance: extends TcpConnection
Afficher le fichier Open project: walkor/workerman Class Usage Examples

Méthodes publiques

Свойство Type Description
$onConnect callback Emitted when socket connection is successfully established.
$transport string Transport layer protocol.

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
emitError ( integer $code, string $msg ) : void Try to emit onError callback.

Method Details

__construct() public méthode

Construct.
public __construct ( string $remote_address, array $context_option = null )
$remote_address string
$context_option array

checkConnection() public méthode

Check connection is successfully established or faild.
public checkConnection ( resource $socket ) : void
$socket resource
Résultat void

connect() public méthode

Do connect.
public connect ( ) : void
Résultat void

emitError() protected méthode

Try to emit onError callback.
protected emitError ( integer $code, string $msg ) : void
$code integer
$msg string
Résultat void

getRemoteHost() public méthode

Get remote address.
public getRemoteHost ( ) : string
Résultat string

getRemoteURI() public méthode

Get remote URI.
public getRemoteURI ( ) : string
Résultat string

reConnect() public méthode

Reconnect.
public reConnect ( integer $after ) : void
$after integer
Résultat void

Property Details

$_builtinTransports protected_oe static_oe property

PHP built-in protocols.
protected static array $_builtinTransports
Résultat array

$_connectStartTime protected_oe property

Connect start time.
protected string $_connectStartTime
Résultat string

$_contextOption protected_oe property

Context option.
protected resource $_contextOption
Résultat resource

$_reconnectTimer protected_oe property

Reconnect timer.
protected int $_reconnectTimer
Résultat integer

$_remoteHost protected_oe property

Remote host.
protected string $_remoteHost
Résultat string

$_remoteURI protected_oe property

Remote URI.
protected string $_remoteURI
Résultat string

$_status protected_oe property

Status.
protected int $_status
Résultat integer

$onConnect public_oe property

Emitted when socket connection is successfully established.
public callback $onConnect
Résultat callback

$transport public_oe property

Transport layer protocol.
public string $transport
Résultat string