Example #1
0
 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();
         }
     }
 }
Example #2
0
 public function __construct(Worker $worker, Dispatcher $event, $socket, Pipeline $pipeline, Config $config = null, WriteBuffer $writeBuffer = null)
 {
     parent::__construct($worker, $event, $socket, $pipeline, $config, $writeBuffer);
     $this->writeBuffer->open();
 }