src/Network/Observer/HeartbeatEmitter.php
protected function onHeartbeatFrame(Frame $frame, array $beats)
    {
        if ($frame->getCommand() === self::FRAME_SERVER_CONNECTED) {
            $this->intervalServer = $beats[1];
            if ($this->intervalClient === null) {
                $this->intervalClient = $this->intervalServer;
            }
        } else {
            $this->intervalClient = $beats[0];
            $this->rememberActivity();
        }
    }
protected function onHeartbeatFrame(Frame $frame, array $beats)
    {
        if ($frame->getCommand() === self::FRAME_SERVER_CONNECTED) {
            $this->intervalServer = $beats[1];
            if ($this->intervalClient === null) {
                $this->intervalClient = $this->intervalServer;
            }
        } else {
            $this->intervalClient = $beats[0];
            $this->rememberActivity();
        }
    }
protected function onHeartbeatFrame ( Frame $ frame , array $ beats ) { if ( $ frame -> getCommand ( ) === self :: FRAME_SERVER_CONNECTED ) { $ this -> intervalServer = $ beats [ 1 ] ; if ( $ this -> intervalClient === null ) { $ this -> intervalClient = $ this -> intervalServer ; } } else { $ this -> intervalClient = $ beats [ 0 ] ; $ this -> rememberActivity ( ) ; } }
A frame with heartbeat details was detected.

Class should set client or server interval.

@param Frame $frame
@param array $beats
@return void
A frame with heartbeat details was detected .