Example #1
0
 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();
         }
     }
 }