EventPusher
class EventPusher implements MessageComponentInterface
Constants
KEEP_ALIVE |
Max pong time and interval between pings in seconds |
Methods
__construct(LoopInterface $loop, OutputInterface $output = null)
Create a new event pusher handler
onOpen(ConnectionInterface $conn)
Open the connection
onMessage(ConnectionInterface $from, mixed $msg)
Send a message as a client
onClose(ConnectionInterface $conn)
Close a connection
onServerEvent(string $event)
Action to call when the server notifies us about something
ping()
Send a ping message to all clients and kick those who didn't respond
Details
at line line 47
__construct(LoopInterface $loop, OutputInterface $output = null)
Create a new event pusher handler
at line line 63
onOpen(ConnectionInterface $conn)
Open the connection
at line line 88
onMessage(ConnectionInterface $from, mixed $msg)
Send a message as a client
at line line 100
onClose(ConnectionInterface $conn)
Close a connection
at line line 118
onError(ConnectionInterface $conn, Exception $e)
Action to call on an error
at line line 219
onServerEvent(string $event)
Action to call when the server notifies us about something
at line line 260
ping()
Send a ping message to all clients and kick those who didn't respond