-
Notifications
You must be signed in to change notification settings - Fork 0
WebSockets\Message
AlMA PRO LEADER edited this page Oct 19, 2018
·
2 revisions
This class implements \Ratchet\MessageComponentInterface
which creates four functions: onOpen, onMessage, onClose & onError.
This function is called with every new client and then calls \APLib\WebSockets::add
function to add the client to the active clients' list.
This function is called when ever a client sends a message and then passes the client along with the message received to \APLib\WebSockets::respond
function.
This function is called when ever a client closes the connection and then passes the client to \APLib\WebSockets::remove
function to be removed from the active clients' list.
This function is called when ever a connection error happens and closes the connection with the client that caused it.