Exemplo n.º 1
0
 protected function addSignalEvents(array $signals)
 {
     foreach ($signals as $signal) {
         $listener = Listener::signal($this->event, $signal);
         $listener->register(static::EVENT_SIGNAL);
         $listener->listen();
     }
 }
Exemplo n.º 2
0
 public function onWrite($socket, Listener $listener)
 {
     socket_write($socket, $listener->getArgument());
 }
Exemplo n.º 3
0
 public function onSend($socket, Listener $listener)
 {
     socket_write($socket, $this->buffer);
     $this->clear();
     $listener->delete();
     $this->event->free($listener->getName(), $listener, true);
 }