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