From 73b49b469d9a1553d7b4952e2f826cda02d1af1b Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Mon, 26 Mar 2012 15:59:24 -0400 Subject: [PATCH] [WAMP] Init Welcome message --- .../Component/WAMP/Command/Action/Welcome.php | 13 +++++++++++++ src/Ratchet/Component/WAMP/WAMPServerComponent.php | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/Ratchet/Component/WAMP/Command/Action/Welcome.php diff --git a/src/Ratchet/Component/WAMP/Command/Action/Welcome.php b/src/Ratchet/Component/WAMP/Command/Action/Welcome.php new file mode 100644 index 0000000..570882d --- /dev/null +++ b/src/Ratchet/Component/WAMP/Command/Action/Welcome.php @@ -0,0 +1,13 @@ +setMessage(json_encode(array(WAMP::MSG_WELCOME, $sessionId, 1, $serverIdent))); + } +} \ No newline at end of file diff --git a/src/Ratchet/Component/WAMP/WAMPServerComponent.php b/src/Ratchet/Component/WAMP/WAMPServerComponent.php index cbc66a8..8a74e68 100644 --- a/src/Ratchet/Component/WAMP/WAMPServerComponent.php +++ b/src/Ratchet/Component/WAMP/WAMPServerComponent.php @@ -12,6 +12,7 @@ use Ratchet\Component\WAMP\Command\Action\Prefix; * +--------------+----+------------------+ * | Message Type | ID | DIRECTION | * |--------------+----+------------------+ + * | WELCOME | 0 | Server-to-Client | * | PREFIX | 1 | Bi-Directional | * | CALL | 2 | Client-to-Server | * | CALL RESULT | 3 | Server-to-Client | @@ -21,8 +22,8 @@ use Ratchet\Component\WAMP\Command\Action\Prefix; * | PUBLISH | 7 | Client-to-Server | * | EVENT | 8 | Server-to-Client | * +--------------+----+------------------+ - * @link http://www.tavendo.de/autobahn/protocol.html - * @link https://raw.github.com/oberstet/Autobahn/master/lib/javascript/autobahn.js + * @link http://wamp.ws/spec + * @link https://github.com/oberstet/AutobahnJS */ class WAMPServerComponent implements WebSocketComponentInterface { const MSG_WELCOME = 0;