Class ServerProtocol
WebSocket Application Messaging Protocol
- Ratchet\Wamp\ServerProtocol implements Ratchet\MessageComponentInterface, Ratchet\WebSocket\WsServerInterface
Namespace: Ratchet\Wamp
Link: http://wamp.ws/spec
Link: +--------------+----+------------------+ | Message Type | ID | DIRECTION | |--------------+----+------------------+ | WELCOME | 0 | Server-to-Client | | PREFIX | 1 | Bi-Directional | | CALL | 2 | Client-to-Server | | CALL RESULT | 3 | Server-to-Client | | CALL ERROR | 4 | Server-to-Client | | SUBSCRIBE | 5 | Client-to-Server | | UNSUBSCRIBE | 6 | Client-to-Server | | PUBLISH | 7 | Client-to-Server | | EVENT | 8 | Server-to-Client | +--------------+----+------------------+
Located at Ratchet/Wamp/ServerProtocol.php
Link: http://wamp.ws/spec
Link: +--------------+----+------------------+ | Message Type | ID | DIRECTION | |--------------+----+------------------+ | WELCOME | 0 | Server-to-Client | | PREFIX | 1 | Bi-Directional | | CALL | 2 | Client-to-Server | | CALL RESULT | 3 | Server-to-Client | | CALL ERROR | 4 | Server-to-Client | | SUBSCRIBE | 5 | Client-to-Server | | UNSUBSCRIBE | 6 | Client-to-Server | | PUBLISH | 7 | Client-to-Server | | EVENT | 8 | Server-to-Client | +--------------+----+------------------+
Located at Ratchet/Wamp/ServerProtocol.php
public
|
|
public
array
|
#
getSubProtocols( )
If any component in a stack supports a WebSocket sub-protocol return each supported in an array |
public
|
#
onOpen(
When a new connection is opened it will be passed to this method |
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 |
integer |
MSG_WELCOME
|
0 |
|
integer |
MSG_PREFIX
|
1 |
|
integer |
MSG_CALL
|
2 |
|
integer |
MSG_CALL_RESULT
|
3 |
|
integer |
MSG_CALL_ERROR
|
4 |
|
integer |
MSG_SUBSCRIBE
|
5 |
|
integer |
MSG_UNSUBSCRIBE
|
6 |
|
integer |
MSG_PUBLISH
|
7 |
|
integer |
MSG_EVENT
|
8 |
protected
|
$_decorating |
|
|
protected
|
$connections |
|