/** * @return string * * @throws \WebSocket\ConnectionException */ protected function receive_fragment() { $returnValue = parent::receive_fragment(); if ($this->getLastOpcode() === 'ping') { $this->send('pong', 'pong', true); } return $returnValue; }
/** * Increment the fragment recieve counter */ protected function receive_fragment() { $this->fragment_count['receive']++; return parent::receive_fragment(); }