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

Method readMessageBegin

lib/cpp/src/thrift/protocol/THeaderProtocol.cpp:157–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 */
156
157uint32_t THeaderProtocol::readMessageBegin(std::string& name,
158 TMessageType& messageType,
159 int32_t& seqId) {
160 // Read the next frame, and change protocols if needed
161 try {
162 trans_->resetProtocol();
163 resetProtocol();
164 } catch (const TApplicationException& ex) {
165 writeMessageBegin("", T_EXCEPTION, 0);
166 ex.write((TProtocol*)this);
167 writeMessageEnd();
168 trans_->flush();
169
170 // The framing is still good, but we don't know about this protocol.
171 // In the future, this could be made a client-side only error if
172 // connection pooling is used.
173 throw ex;
174 }
175 return proto_->readMessageBegin(name, messageType, seqId);
176}
177
178uint32_t THeaderProtocol::readMessageEnd() {
179 return proto_->readMessageEnd();

Callers

nothing calls this directly

Calls 4

writeMethod · 0.65
readMessageBeginMethod · 0.65
resetProtocolMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected