PHP 인터페이스 Sulu\Component\Websocket\MessageDispatcher\MessageDispatcherInterface

파일 보기 프로젝트 열기: sulu/sulu 0 사용 예제들

공개 메소드들

메소드 설명
add ( string $name, Sulu\Component\Websocket\MessageDispatcher\MessageHandlerInterface $handler )
dispatch ( Ratchet\ConnectionInterface $conn, string $name, array $message, array $options, Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context ) Dispatch event to handler with given name.
onClose ( Ratchet\ConnectionInterface $conn, Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context ) All message handler get the message that the connection is losed.

메소드 상세

add() 공개 메소드

public add ( string $name, Sulu\Component\Websocket\MessageDispatcher\MessageHandlerInterface $handler )
$name string Message name
$handler Sulu\Component\Websocket\MessageDispatcher\MessageHandlerInterface Handler which process messages with given name

dispatch() 공개 메소드

Dispatch event to handler with given name.
public dispatch ( Ratchet\ConnectionInterface $conn, string $name, array $message, array $options, Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context )
$conn Ratchet\ConnectionInterface
$name string Message name
$message array
$options array
$context Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface

onClose() 공개 메소드

All message handler get the message that the connection is losed.
public onClose ( Ratchet\ConnectionInterface $conn, Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface $context )
$conn Ratchet\ConnectionInterface
$context Sulu\Component\Websocket\ConnectionContext\ConnectionContextInterface