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

Method readMessageBegin

lib/php/lib/Protocol/TBinaryProtocol.php:231–260  ·  view source on GitHub ↗
(&$name, &$type, &$seqid)

Source from the content-addressed store, hash-verified

229 }
230
231 public function readMessageBegin(&$name, &$type, &$seqid)
232 {
233 $result = $this->readI32($sz);
234 if ($sz < 0) {
235 $version = (int)($sz & self::VERSION_MASK);
236 if ($version != (int)self::VERSION_1) {
237 throw new TProtocolException('Bad version identifier: ' . $sz, TProtocolException::BAD_VERSION);
238 }
239 $type = $sz & 0x000000ff;
240 $result +=
241 $this->readString($name) +
242 $this->readI32($seqid);
243 } else {
244 if ($this->strictRead_) {
245 throw new TProtocolException(
246 'No version identifier, old protocol client?',
247 TProtocolException::BAD_VERSION
248 );
249 } else {
250 // Handle pre-versioned input
251 $name = $this->trans_->readAll($sz);
252 $result +=
253 $sz +
254 $this->readByte($type) +
255 $this->readI32($seqid);
256 }
257 }
258
259 return $result;
260 }
261
262 public function readMessageEnd()
263 {

Callers

nothing calls this directly

Calls 4

readI32Method · 0.95
readStringMethod · 0.95
readByteMethod · 0.95
readAllMethod · 0.45

Tested by

no test coverage detected