コード例 #1
0
ファイル: Server.php プロジェクト: panlatent/aurora
 public function stop()
 {
     if (!$this->started) {
         throw new Exception("Server is marked as stopped");
     }
     $this->started = false;
     $this->timestamp->mark(ServerTimestampType::ServerStop);
     return $this->event->stop();
 }
コード例 #2
0
ファイル: Events.php プロジェクト: panlatent/aurora
 public function onSocketReadWaitTimeoutTimer()
 {
     if (null === $this->bind->getKeepAlive() || true === $this->bind->getKeepAlive()) {
         return;
     }
     // Ignore this timer at keep-alive
     $timestamp = $this->bind->getTimestamp();
     if ($socketLastReadUT = $timestamp->get(ServerTimestampType::SocketLastRead)) {
         $interval = TimestampMarker::interval($socketLastReadUT);
         if ($interval >= $this->bind->getConfig()->socket_last_wait_timeout) {
             $this->bind->declareClose();
         }
     }
 }
コード例 #3
0
ファイル: Events.php プロジェクト: panlatent/aurora
 public function onSocketReadWaitTimeoutTimer()
 {
     $timestamp = $this->bind->getTimestamp();
     if ($socketLastReadUT = $timestamp->get(ServerTimestampType::SocketLastRead)) {
         $interval = TimestampMarker::interval($socketLastReadUT);
         if ($interval >= $this->bind->getConfig()->socket_last_wait_timeout) {
             $this->bind->declareClose();
         }
     }
 }