onOpen() onOpen(\Ratchet\ConnectionInterface $conn) New Web Socket connection is opened Parameters \Ratchet\ConnectionInterface $conn The socket/connection that just connected to your application
onMessage() onMessage(\Ratchet\ConnectionInterface $from, string $msg) Send message ie slide content to all active Web Socket connections Parameters \Ratchet\ConnectionInterface $from Sender Web Socket connection string $msg Slide content
onClose() onClose(\Ratchet\ConnectionInterface $conn) Web Socket connection is closed Parameters \Ratchet\ConnectionInterface $conn The socket/connection that just disconnected
onError() onError(\Ratchet\ConnectionInterface $conn, \Exception $e) Error with one of the sockets Or somewhere in the app Parameters \Ratchet\ConnectionInterface $conn Client Web Socket connection \Exception $e Exception
init() init() Initialize presentation broadcast Send last active slide to all active Web Socket connections
addPresenter() addPresenter(integer $resourceId) Add presenter to presenter list Parameters integer $resourceId ResourceId of presenter
removePresenter() removePresenter(integer $resourceId) Remove presenter from presenter list Parameters integer $resourceId ResourceId of presenter
isPresenter() isPresenter(integer $resourceId) : boolean Check Web Socket Connection is presenter or not Parameters integer $resourceId ResourceId for Web Socket connection Returns boolean — Client is presenter or not
sendMessageToAll() sendMessageToAll() Send message ie slide content to all active Web Socket connections