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(); }
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(); } } }
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(); } } }