Kraken\Channel\Channel::handleReceiveRequest PHP Метод

handleReceiveRequest() защищенный Метод

protected handleReceiveRequest ( Kraken\Channel\Protocol\ProtocolInterface $protocol ) : boolean
$protocol Kraken\Channel\Protocol\ProtocolInterface
Результат boolean
    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;
    }