diff --git a/lib/Ratchet/Application/WAMP/App.php b/lib/Ratchet/Application/WAMP/App.php index f726460..6d9c002 100644 --- a/lib/Ratchet/Application/WAMP/App.php +++ b/lib/Ratchet/Application/WAMP/App.php @@ -127,6 +127,8 @@ class App implements WebSocketAppInterface { } /** + * If the developer's application as set some server-to-client prefixes to be set, + * this method ensures those are taxied to the next outgoing message * @param Ratchet\Resource\Command\CommandInterface|NULL * @return Ratchet\Resource\Command\Composite */ diff --git a/lib/Ratchet/Application/WAMP/Command/Action/CallError.php b/lib/Ratchet/Application/WAMP/Command/Action/CallError.php new file mode 100644 index 0000000..afba2b2 --- /dev/null +++ b/lib/Ratchet/Application/WAMP/Command/Action/CallError.php @@ -0,0 +1,31 @@ +_id = $callId; + $this->_uri = $uri; + $this->_desc = $desc; + + return $this->setMessage(json_encode(array(4, $callId, $uri, $desc))); + } + + public function getId() { + return $this->_id; + } + + public function getUri() { + return $this->_uri; + } + + public function getDescription() { + return $this->_desc; + } +} \ No newline at end of file diff --git a/lib/Ratchet/Application/WAMP/Command/Action/CallResult.php b/lib/Ratchet/Application/WAMP/Command/Action/CallResult.php new file mode 100644 index 0000000..5e41a8a --- /dev/null +++ b/lib/Ratchet/Application/WAMP/Command/Action/CallResult.php @@ -0,0 +1,26 @@ +_id = $callId; + $this->_data = $data; + + return $this->setMessage(json_encode(array(3, $callId, $data))); + } + + public function getId() { + return $this->_id; + } + + public function getData() { + return $this->_data; + } +} \ No newline at end of file diff --git a/lib/Ratchet/Application/WAMP/Command/Action/Prefix.php b/lib/Ratchet/Application/WAMP/Command/Action/Prefix.php index 56a5d00..627dce2 100644 --- a/lib/Ratchet/Application/WAMP/Command/Action/Prefix.php +++ b/lib/Ratchet/Application/WAMP/Command/Action/Prefix.php @@ -3,6 +3,9 @@ namespace Ratchet\Application\WAMP\Command\Action; use Ratchet\Resource\Command\Action\SendMessage; /** + * Send a curie to uri mapping to the client + * Both sides will agree to send the curie, representing the uri, + * resulting in less data transfered */ class Prefix extends SendMessage { protected $_curie;