Thrift之TProcess类体系原理及源码详细解析
2012-06-03 15:50:17 来源:WEB开发网核心提示:iprot->skip(::apache::thrift::protocol::T_STRUCT);iprot->readMessageEnd();iprot->getTransport()->readEnd();//抛出一个不知道的方法的异常::apache::thrift::TApplica
iprot->skip(::apache::thrift::protocol::T_STRUCT);
iprot->readMessageEnd();
iprot->getTransport()->readEnd();
//抛出一个不知道的方法的异常
::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD,
"Invalid method name: '"+fname+"'");
//写入到调用客户端
oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);
x.write(oprot);
oprot->writeMessageEnd();
oprot->getTransport()->writeEnd();
oprot->getTransport()->flush();
更多精彩
赞助商链接