Example #1
0
 /**
  * Disable all events of sockets
  * @return void
  */
 public function disable()
 {
     if (!$this->enabled) {
         return;
     }
     $this->enabled = false;
     if ($this->ev instanceof \Event) {
         $this->ev->del();
     } elseif ($this->ev instanceof \EventListener) {
         $this->ev->disable();
     }
 }