PHP Class Askedio\LaravelRatchet\RatchetServer

Inheritance: implements Ratchet\MessageComponentInterface
Datei anzeigen Open project: askedio/laravel-ratchet Class Usage Examples

Protected Properties

Property Type Description
$clients [type] Clients.
$conn Ratchet\ConnectionInterface Current connection.
$connections [type] Total connections.
$console [type] Console.
$throttled [type] Throttled.

Public Methods

Method Description
__construct ( [type] $console ) Set clients and console.
abort ( Ratchet\ConnectionInterface $conn ) : [type] Close the current connection.
onClose ( Ratchet\ConnectionInterface $conn ) : [type] Perform action on close.
onError ( Ratchet\ConnectionInterface $conn, Exception $exception ) : [type] Perform action on error.
onMessage ( Ratchet\ConnectionInterface $conn, [type] $input ) : [type] Perform action on message.
onOpen ( Ratchet\ConnectionInterface $conn ) : [type] Perform action on open.
send ( Ratchet\ConnectionInterface $conn, [type] $message ) : [type] Send a message to the current connection.
sendAll ( [type] $message ) : [type] Send a message to all connections.

Private Methods

Method Description
attach ( )
isThrottled ( [type] $conn, [type] $setting ) : boolean Check if the called function is throttled.
limit ( ) : [type] Limit connections.
throttle ( ) : [type] Throttle connections.

Method Details

__construct() public method

Set clients and console.
public __construct ( [type] $console )
$console [type]

abort() public method

Close the current connection.
public abort ( Ratchet\ConnectionInterface $conn ) : [type]
$conn Ratchet\ConnectionInterface
return [type]

onClose() public method

Perform action on close.
public onClose ( Ratchet\ConnectionInterface $conn ) : [type]
$conn Ratchet\ConnectionInterface [description]
return [type]

onError() public method

Perform action on error.
public onError ( Ratchet\ConnectionInterface $conn, Exception $exception ) : [type]
$conn Ratchet\ConnectionInterface [description]
$exception Exception [description]
return [type]

onMessage() public method

Perform action on message.
public onMessage ( Ratchet\ConnectionInterface $conn, [type] $input ) : [type]
$conn Ratchet\ConnectionInterface [description]
$input [type]
return [type]

onOpen() public method

Perform action on open.
public onOpen ( Ratchet\ConnectionInterface $conn ) : [type]
$conn Ratchet\ConnectionInterface [description]
return [type]

send() public method

Send a message to the current connection.
public send ( Ratchet\ConnectionInterface $conn, [type] $message ) : [type]
$conn Ratchet\ConnectionInterface
$message [type]
return [type]

sendAll() public method

Send a message to all connections.
public sendAll ( [type] $message ) : [type]
$message [type]
return [type]

Property Details

$clients protected_oe property

Clients.
protected [type] $clients
return [type]

$conn protected_oe property

Current connection.
protected ConnectionInterface,Ratchet $conn
return Ratchet\ConnectionInterface

$connections protected_oe property

Total connections.
protected [type] $connections
return [type]

$console protected_oe property

Console.
protected [type] $console
return [type]

$throttled protected_oe property

Throttled.
protected [type] $throttled
return [type]