WAMP FUNCTIONAL
RPC return message RPC return error WAMP protocol functionally complete!
This commit is contained in:
		
							parent
							
								
									f84be39fcf
								
							
						
					
					
						commit
						3372f72344
					
				| @ -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 | ||||
|      */ | ||||
|  | ||||
							
								
								
									
										31
									
								
								lib/Ratchet/Application/WAMP/Command/Action/CallError.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								lib/Ratchet/Application/WAMP/Command/Action/CallError.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | ||||
| <?php | ||||
| namespace Ratchet\Application\WAMP\Command\Action; | ||||
| use Ratchet\Resource\Command\Action\SendMessage; | ||||
| 
 | ||||
| class CallError extends SendMessage { | ||||
|     protected $_id; | ||||
| 
 | ||||
|     protected $_uri; | ||||
| 
 | ||||
|     protected $_desc; | ||||
| 
 | ||||
|     public function setError($callId, $uri, $desc) { | ||||
|         $this->_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; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										26
									
								
								lib/Ratchet/Application/WAMP/Command/Action/CallResult.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								lib/Ratchet/Application/WAMP/Command/Action/CallResult.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | ||||
| <?php | ||||
| namespace Ratchet\Application\WAMP\Command\Action; | ||||
| use Ratchet\Resource\Command\Action\SendMessage; | ||||
| 
 | ||||
| /** | ||||
|  */ | ||||
| class CallResult extends SendMessage { | ||||
|     protected $_id; | ||||
| 
 | ||||
|     protected $_data; | ||||
| 
 | ||||
|     public function setResult($callId, array $data = array()) { | ||||
|         $this->_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; | ||||
|     } | ||||
| } | ||||
| @ -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; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Chris Boden
						Chris Boden