PHP Interface Aerys\Websocket\Endpoint

Show file Open project: amphp/aerys Interface Usage Examples

Public Methods

Method Description
close ( integer $clientId, integer $code = Code::NORMAL_CLOSE, string $reason = "" )
getClients ( ) : array
getInfo ( integer $clientId ) : array
send ( $clientId, string $data ) : Amp\Promise
sendBinary ( $clientId, string $data ) : Amp\Promise

Method Details

close() public method

public close ( integer $clientId, integer $code = Code::NORMAL_CLOSE, string $reason = "" )
$clientId integer
$code integer
$reason string

getClients() public method

public getClients ( ) : array
return array

getInfo() public method

public getInfo ( integer $clientId ) : array
$clientId integer
return array

send() public method

public send ( $clientId, string $data ) : Amp\Promise
$data string
return Amp\Promise

sendBinary() public method

public sendBinary ( $clientId, string $data ) : Amp\Promise
$data string
return Amp\Promise