PHP Класс Askedio\LaravelRatchet\Pusher

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

Открытые свойства

Свойство Тип Описание
$subscribedTopics

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

Свойство Тип Описание
$console

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

Метод Описание
__construct ( $console )
onCall ( Ratchet\ConnectionInterface $conn, string $id, string | Topic $topic, array $params ) An RPC call has been received.
onClose ( Ratchet\ConnectionInterface $conn ) This is called before or after a socket is closed (depends on how it's closed). SendMessage to $conn will not result in an error if it has already been closed.
onEntry ( $entry )
onError ( Ratchet\ConnectionInterface $conn, Exception $e ) If there is an error with one of the sockets, or somewhere in the application where an Exception is thrown, the Exception is sent back down the stack, handled by the Server and bubbled back up the application through this method.
onOpen ( Ratchet\ConnectionInterface $conn ) When a new connection is opened it will be passed to this method.
onPublish ( Ratchet\ConnectionInterface $conn, string | Topic $topic, string $event, array $exclude, array $eligible ) A client is attempting to publish content to a subscribed connections on a URI.
onSubscribe ( Ratchet\ConnectionInterface $conn, string | Topic $topic ) A request to subscribe to a topic has been made.
onUnSubscribe ( Ratchet\ConnectionInterface $conn, string | Topic $topic ) A request to unsubscribe from a topic has been made.

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

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

public __construct ( $console )

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

An RPC call has been received.
public onCall ( Ratchet\ConnectionInterface $conn, string $id, string | Topic $topic, array $params )
$conn Ratchet\ConnectionInterface
$id string The unique ID of the RPC, required to respond to
$topic string | Topic The topic to execute the call against
$params array Call parameters received from the client

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

This is called before or after a socket is closed (depends on how it's closed). SendMessage to $conn will not result in an error if it has already been closed.
public onClose ( Ratchet\ConnectionInterface $conn )
$conn Ratchet\ConnectionInterface The socket/connection that is closing/closed

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

public onEntry ( $entry )

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

If there is an error with one of the sockets, or somewhere in the application where an Exception is thrown, the Exception is sent back down the stack, handled by the Server and bubbled back up the application through this method.
public onError ( Ratchet\ConnectionInterface $conn, Exception $e )
$conn Ratchet\ConnectionInterface
$e Exception

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

When a new connection is opened it will be passed to this method.
public onOpen ( Ratchet\ConnectionInterface $conn )
$conn Ratchet\ConnectionInterface The socket/connection that just connected to your application

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

A client is attempting to publish content to a subscribed connections on a URI.
public onPublish ( Ratchet\ConnectionInterface $conn, string | Topic $topic, string $event, array $exclude, array $eligible )
$conn Ratchet\ConnectionInterface
$topic string | Topic The topic the user has attempted to publish to
$event string Payload of the publish
$exclude array A list of session IDs the message should be excluded from (blacklist)
$eligible array A list of session Ids the message should be send to (whitelist)

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

A request to subscribe to a topic has been made.
public onSubscribe ( Ratchet\ConnectionInterface $conn, string | Topic $topic )
$conn Ratchet\ConnectionInterface
$topic string | Topic The topic to subscribe to

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

A request to unsubscribe from a topic has been made.
public onUnSubscribe ( Ratchet\ConnectionInterface $conn, string | Topic $topic )
$conn Ratchet\ConnectionInterface
$topic string | Topic The topic to unsubscribe from

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

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

protected $console

$subscribedTopics публичное свойство

public $subscribedTopics