Return protocol timestamp.
public getTimestamp ( ) : integer | ||
Результат | integer |
/** * @param ProtocolInterface * @return bool */ protected function handleReceiveRequest(ProtocolInterface $protocol) { if ($protocol->getType() === Channel::TYPE_REQ && $protocol->getDestination() === $this->name) { $pid = $protocol->getPid(); $timestamp = $protocol->getTimestamp(); $now = $this->getTime(); if ($timestamp <= $now || $this->existsResponse($pid)) { return true; } $timestamp -= 5000.0; $this->addResponse($pid, $this->createResponse($pid, $protocol->getOrigin(), $timestamp, $timestamp - $now)); } return false; }