Пример #1
0
 public function receiveData($data)
 {
     if ($this->getBufferLength() <= self::BYTE_INITIAL_LENGTH) {
         $this->length = null;
         $this->offset_payload = null;
     }
     parent::receiveData($data);
 }
Пример #2
0
 /**
  * @param string $payload
  * @dataProvider getValidEncodePayloads
  */
 public function testEncodePayloadReflection($type, $payload, $masked)
 {
     $this->frame->encode($payload, $type, $masked);
     $this->assertEquals($payload, $this->frame->getFramePayload(), 'Encode retains payload information');
 }