mxmbsocket/lib/Ratchet/Application/WAMP/Command/Action/Event.php
Chris Boden 9b14684cbe WAMP Event Action
Added the Event action in WAMP (like SendMessage)
Confirmed subscribe, unsubscribe, publish, event working in WAMP
2012-01-16 22:55:44 -05:00

17 lines
438 B
PHP

<?php
namespace Ratchet\Application\WAMP\Command\Action;
use Ratchet\Resource\Command\Action\SendMessage;
/**
* This is an event in the context of a topicURI
* This event (message) is to be sent to all subscribers of $uri
*/
class Event extends SendMessage {
/**
* @param ...
* @param string
*/
public function setEvent($uri, $msg) {
$this->setMessage(json_encode(array(8, $uri, (string)$msg)));
}
}