PHP Класс Askedio\LaravelRatchet\RatchetServer

Наследование: implements Ratchet\MessageComponentInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$clients [type] Clients.
$conn Ratchet\ConnectionInterface Current connection.
$connections [type] Total connections.
$console [type] Console.
$throttled [type] Throttled.

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
attach ( )
isThrottled ( [type] $conn, [type] $setting ) : boolean Check if the called function is throttled.
limit ( ) : [type] Limit connections.
throttle ( ) : [type] Throttle connections.

Описание методов

__construct() публичный Метод

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

abort() публичный Метод

Close the current connection.
public abort ( Ratchet\ConnectionInterface $conn ) : [type]
$conn Ratchet\ConnectionInterface
Результат [type]

onClose() публичный Метод

Perform action on close.
public onClose ( Ratchet\ConnectionInterface $conn ) : [type]
$conn Ratchet\ConnectionInterface [description]
Результат [type]

onError() публичный Метод

Perform action on error.
public onError ( Ratchet\ConnectionInterface $conn, Exception $exception ) : [type]
$conn Ratchet\ConnectionInterface [description]
$exception Exception [description]
Результат [type]

onMessage() публичный Метод

Perform action on message.
public onMessage ( Ratchet\ConnectionInterface $conn, [type] $input ) : [type]
$conn Ratchet\ConnectionInterface [description]
$input [type]
Результат [type]

onOpen() публичный Метод

Perform action on open.
public onOpen ( Ratchet\ConnectionInterface $conn ) : [type]
$conn Ratchet\ConnectionInterface [description]
Результат [type]

send() публичный Метод

Send a message to the current connection.
public send ( Ratchet\ConnectionInterface $conn, [type] $message ) : [type]
$conn Ratchet\ConnectionInterface
$message [type]
Результат [type]

sendAll() публичный Метод

Send a message to all connections.
public sendAll ( [type] $message ) : [type]
$message [type]
Результат [type]

Описание свойств

$clients защищенное свойство

Clients.
protected [type] $clients
Результат [type]

$conn защищенное свойство

Current connection.
protected ConnectionInterface,Ratchet $conn
Результат Ratchet\ConnectionInterface

$connections защищенное свойство

Total connections.
protected [type] $connections
Результат [type]

$console защищенное свойство

Console.
protected [type] $console
Результат [type]

$throttled защищенное свойство

Throttled.
protected [type] $throttled
Результат [type]