PHP 클래스 Askedio\LaravelRatchet\PusherServer

상속: implements Ratchet\Wamp\WampServerInterface
파일 보기 프로젝트 열기: askedio/laravel-ratchet

공개 메소드들

메소드 설명
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.
onError ( Ratchet\ConnectionInterface $conn, Exception $exception ) 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.

메소드 상세

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

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 $exception )
$conn Ratchet\ConnectionInterface
$exception 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