diff --git a/src/Emitter.php b/src/Emitter.php index 7df0255..f559d15 100644 --- a/src/Emitter.php +++ b/src/Emitter.php @@ -41,8 +41,9 @@ public function __construct($redis = FALSE, $opts = array()) { } $this->redis = $redis; - $this->key = (isset($opts['key']) ? $opts['key'] : 'socket.io') . '#emitter'; - + $this->key = (isset($opts['key']) ? $opts['key'] : 'socket.io#emitter'); + $this->uid = (isset($opts['uid']) ? $opts['uid'] : 'emitter'); + $this->_rooms = array(); $this->_flags = array(); } @@ -117,7 +118,7 @@ public function emit() { } // publish - $packed = msgpack_pack(array($packet, array( + $packed = msgpack_pack(array($this->uid, $packet, array( 'rooms' => $this->_rooms, 'flags' => $this->_flags )));