PHP Class Askedio\LaravelRatchet\Pusher

Inheritance: implements Ratchet\Wamp\WampServerInterface
ファイルを表示 Open project: askedio/laravel-ratchet

Public Properties

Property Type Description
$subscribedTopics

Protected Properties

Property Type Description
$console

Public Methods

Method Description
__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.

Method Details

__construct() public method

public __construct ( $console )

onCall() public method

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() public method

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 method

public onEntry ( $entry )

onError() public method

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() public method

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() public method

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() public method

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() public method

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

Property Details

$console protected_oe property

protected $console

$subscribedTopics public_oe property

public $subscribedTopics