This commit is contained in:
Chris Boden 2012-04-26 20:56:12 -04:00
parent d91a88219b
commit 162d490b55
2 changed files with 11 additions and 3 deletions

View File

@ -11,6 +11,9 @@ use Ratchet\Component\WAMP\Command\Action\Welcome;
/** /**
* WebSocket Application Messaging Protocol * WebSocket Application Messaging Protocol
* *
* @link http://wamp.ws/spec
* @link https://github.com/oberstet/AutobahnJS
*
* +--------------+----+------------------+ * +--------------+----+------------------+
* | Message Type | ID | DIRECTION | * | Message Type | ID | DIRECTION |
* |--------------+----+------------------+ * |--------------+----+------------------+
@ -24,8 +27,6 @@ use Ratchet\Component\WAMP\Command\Action\Welcome;
* | PUBLISH | 7 | Client-to-Server | * | PUBLISH | 7 | Client-to-Server |
* | EVENT | 8 | Server-to-Client | * | EVENT | 8 | Server-to-Client |
* +--------------+----+------------------+ * +--------------+----+------------------+
* @link http://wamp.ws/spec
* @link https://github.com/oberstet/AutobahnJS
*/ */
class WAMPServerComponent implements WebSocketComponentInterface { class WAMPServerComponent implements WebSocketComponentInterface {
const MSG_WELCOME = 0; const MSG_WELCOME = 0;
@ -38,6 +39,9 @@ class WAMPServerComponent implements WebSocketComponentInterface {
const MSG_PUBLISH = 7; const MSG_PUBLISH = 7;
const MSG_EVENT = 8; const MSG_EVENT = 8;
/**
* @var WAMPServerComponentInterface
*/
protected $_decorating; protected $_decorating;
/** /**

View File

@ -28,7 +28,7 @@ class WebSocketComponent implements MessageComponentInterface {
protected $_factory; protected $_factory;
/** /**
* Singleton* instances of protocol version classes * Re-entrant instances of protocol version classes
* @internal * @internal
*/ */
protected $_versions = array( protected $_versions = array(
@ -134,11 +134,15 @@ class WebSocketComponent implements MessageComponentInterface {
} }
} }
/**
* {@inheritdoc}
*/
public function onClose(ConnectionInterface $conn) { public function onClose(ConnectionInterface $conn) {
return $this->prepareCommand($this->_decorating->onClose($conn)); return $this->prepareCommand($this->_decorating->onClose($conn));
} }
/** /**
* {@inheritdoc}
* @todo Shouldn't I be using prepareCommand() on the return? look into this * @todo Shouldn't I be using prepareCommand() on the return? look into this
*/ */
public function onError(ConnectionInterface $conn, \Exception $e) { public function onError(ConnectionInterface $conn, \Exception $e) {