Exemple #1
0
 protected function setupController()
 {
     if (!$this->controller) {
         $this->controller = new \ZMQSocket($this->context, \ZMQ::SOCKET_SUB);
         $this->controller->connect(Util::genURI($this->controllerPort));
         $this->controller->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "");
     }
 }
Exemple #2
0
 protected function setupSink()
 {
     if (!$this->sink && $this->sinkPort) {
         $this->sink = new \ZMQSocket($this->context, \ZMQ::SOCKET_PULL);
         $this->sink->bind(Util::genURI($this->sinkPort, "*"));
     }
 }