コード例 #1
0
ファイル: Events.php プロジェクト: panlatent/aurora
 public function __construct(Dispatcher $event, $bind)
 {
     parent::__construct($event, $bind);
     $event->bind(static::EVENT_SIGNAL, $this);
     $event->bind(static::EVENT_SOCKET_ACCEPT, $this);
     $this->addSignalEvents([SIGTERM, SIGUSR1, SIGUSR2, SIGCHLD]);
 }
コード例 #2
0
ファイル: Events.php プロジェクト: panlatent/aurora
 public function __construct($dispatcher, $bind)
 {
     parent::__construct($dispatcher, $bind);
     $this->event->bind(static::EVENT_SOCKET_READ, $this);
     $this->event->bind(static::EVENT_SOCKET_WRITE, $this);
     $this->event->bind(static::EVENT_TIMER, $this);
     $this->timer = new TimerDispatcher();
     $this->timer->insert([$this, 'onSocketInitWaitTimeoutTimer']);
     $this->timer->insert([$this, 'onSocketReadWaitTimeoutTimer']);
 }