Thrift之TProcess类体系原理及源码详细解析
2012-06-03 15:50:17 来源:WEB开发网核心提示:iprot->readMessageEnd();iprot->getTransport()->readEnd();::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MES
iprot->readMessageEnd();
iprot->getTransport()->readEnd();
::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
//写入(返回)一个异常信息给调用客户端,客户端会根据返回结果处理异常
oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
return true;
}
return process_fn(iprot, oprot, fname, seqid, callContext);//调用实际的函数处理
更多精彩
赞助商链接