MCPcopy Create free account
hub / github.com/apache/thrift / readMessageBegin

Method readMessageBegin

lib/php/lib/Protocol/TCompactProtocol.php:451–469  ·  view source on GitHub ↗
(&$name, &$type, &$seqid)

Source from the content-addressed store, hash-verified

449 }
450
451 public function readMessageBegin(&$name, &$type, &$seqid)
452 {
453 $protoId = 0;
454 $result = $this->readUByte($protoId);
455 if ($protoId != TCompactProtocol::PROTOCOL_ID) {
456 throw new TProtocolException('Bad protocol id in TCompact message');
457 }
458 $verType = 0;
459 $result += $this->readUByte($verType);
460 $type = ($verType >> TCompactProtocol::TYPE_SHIFT_AMOUNT) & TCompactProtocol::TYPE_BITS;
461 $version = $verType & TCompactProtocol::VERSION_MASK;
462 if ($version != TCompactProtocol::VERSION) {
463 throw new TProtocolException('Bad version in TCompact message');
464 }
465 $result += $this->readVarint($seqid);
466 $result += $this->readString($name);
467
468 return $result;
469 }
470
471 public function readMessageEnd()
472 {

Callers

nothing calls this directly

Calls 3

readUByteMethod · 0.95
readVarintMethod · 0.95
readStringMethod · 0.95

Tested by

no test coverage detected