Class WsServer
The adapter to handle WebSocket requests/responses This is a mediator between the Server and your application to handle real-time messaging through a web browser
- Ratchet\WebSocket\WsServer implements Ratchet\Http\HttpServerInterface uses Ratchet\Http\CloseResponseTrait
Namespace: Ratchet\WebSocket
Link: http://ca.php.net/manual/en/ref.http.php
Link: http://dev.w3.org/html5/websockets/
Located at Ratchet/WebSocket/WsServer.php
Link: http://ca.php.net/manual/en/ref.http.php
Link: http://dev.w3.org/html5/websockets/
Located at Ratchet/WebSocket/WsServer.php
public
|
|
public
|
|
public
|
#
onMessage(
Triggered when a client sends data through the socket |
public
|
#
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
|
#
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
|
|
public
|
|
public
|
protected
|
$connections |
|