Thruway\Transport\RatchetTransport::onPong PHP Méthode

onPong() public méthode

Handle on pong
public onPong ( Ratchet\WebSocket\Version\RFC6455\Frame $frame )
$frame Ratchet\WebSocket\Version\RFC6455\Frame
    public function onPong(Frame $frame)
    {
        $seq = $frame->getPayload();
        if (isset($this->pingRequests[$seq]) && isset($this->pingRequests[$seq]['deferred'])) {
            $this->pingRequests[$seq]['deferred']->resolve($seq);
            /* @var $timer \React\EventLoop\Timer\TimerInterface */
            $timer = $this->pingRequests[$seq]['timer'];
            $timer->cancel();
            unset($this->pingRequests[$seq]);
        }
    }