ByteBuf to DynamicCompositeByteBuf.brpc.Errnobrpc.policy.RpcMetabrpc.policy.RpcMetabrpc.policy.RpcRequestMetabrpc.policy.RpcRequestMetabrpc.policy.RpcResponseMetabrpc.policy.RpcResponseMetabody_size][meta_size
], 12 bytes in total
body_size and meta_size are in network byte
order (big endian)
Use service->full_name() and method_name to identify the service and
method to call
attachment_size is set iff request/response has attachment
The following fields of rpc are not supported yet:
chunk_info
Created by huwenwei on 2017/9/22.optional int32 attachment_size = 5;optional bytes authentication_data = 7;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 5;required int64 chunk_id = 2;optional .brpc.ChunkInfo chunk_info = 6;optional int32 compress_type = 3;optional int32 compress_type = 4;optional .brpc.policy.SofaCompressType compress_type = 300;
Set the request/response compress type.optional int32 compress_type = 3;optional int64 consumed_size = 1;optional int64 correlation_id = 4;optional sint64 correlation_id = 3;optional int64 correlation_id = 4;optional bytes credential_data = 15;optional int32 error_code = 1;optional int32 error_code = 201;
The error code if the call is failed.optional int32 error_code = 1;optional string error_text = 2;optional string error_text = 2;optional .brpc.policy.SofaCompressType expected_response_compress_type = 301;
Set the response compress type of user expected.optional bool failed = 200;
Set as true if the call is failed.optional .brpc.Feedback feedback = 5;optional .brpc.FrameType frame_type = 3;optional bool has_continuation = 4;optional int64 log_id = 5;optional int64 log_id = 3;optional string method = 100;
Method full name.required int32 method_index = 2;optional string method_name = 14;required string method_name = 2;optional bool need_feedback = 2 [default = false];optional int64 parent_span_id = 8;optional int64 parent_span_id = 6;optional string reason = 202;
The error reason if the call is failed.optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.TalkType request_talk_type = 10;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.TalkType response_talk_type = 6;required uint64 sequence_id = 2;
Message sequence id.required string service_name = 1;required string service_name = 1;optional int64 source_stream_id = 2;optional int64 span_id = 9;optional int64 span_id = 5;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;optional .brpc.StreamSettings stream_settings = 8;optional int64 trace_id = 7;optional int64 trace_id = 4;required .brpc.policy.SofaRpcMeta.Type type = 1;optional bytes user_data = 11;optional bytes user_data = 7;optional int64 user_defined_source_addr = 13;optional int64 user_defined_source_addr = 9;optional int32 user_message_size = 12;optional int32 user_message_size = 8;optional bool writable = 3 [default = false];COMPRESS_TYPE_GZIP = 2;COMPRESS_TYPE_LZ4 = 4;COMPRESS_TYPE_NONE = 0;COMPRESS_TYPE_SNAPPY = 1;COMPRESS_TYPE_ZLIB = 3;CONNECTION_TYPE_POOLED = 2;CONNECTION_TYPE_SHORT = 4;CONNECTION_TYPE_SINGLE = 1;CONNECTION_TYPE_UNKNOWN = 0;
bit-exclusive values since we may OR them to represent supported types.CurrentLimiterByteBuf, and it can be read just like a normal ByteBuf.DynamicCompositeByteBuf with netty ByteBuf.DynamicCompositeByteBuf with netty ByteBuf array.InputStream which reads data from a DynamicCompositeByteBuf.bufferbufferEAUTH = 1004;
Unauthorized
EBACKUPREQUEST = 1007;
Sending backup request
ECLOSE = 2005;
Close socket initiatively
EEOF = 1014;
Got EOF
EFAILEDSOCKET = 1009;
Broken socket
EHTTP = 1010;
Bad http call
EINTERNAL = 2001;
Errno caused by server
EITP = 2006;
Failed Itp response
ELIMIT = 2004;
Reached server's limit on resources
ELOGOFF = 2003;
Server is stopping
ENOMETHOD = 1002;
Method not found
ENOSERVICE = 1001;
Errno caused by client
EOVERCROWDED = 1011;
The server is overcrowded
EPCHANFINISH = 1006;
[Internal] ParallelChannel finished
EREQUEST = 1003;
Bad Request
ERESPONSE = 2002;
Bad Response
ERPCTIMEDOUT = 1008;
RPC call is timed out
ERTMPCREATESTREAM = 1013;
createStream was rejected by the RTMP server
ERTMPPUBLISHABLE = 1012;
RtmpRetryingClientStream is publishable
ETOOMANYFAILS = 1005;
Too many sub calls failed
EUNUSED = 1015;
The socket was not needed
ConcurrentHashMap in certain circumstance.FRAME_TYPE_CLOSE = 2;FRAME_TYPE_DATA = 3;FRAME_TYPE_FEEDBACK = 4;FRAME_TYPE_RST = 1;FRAME_TYPE_UNKNOWN = 0;optional int32 attachment_size = 5;optional int32 attachment_size = 5;optional int32 attachment_size = 5;optional bytes authentication_data = 7;optional bytes authentication_data = 7;optional bytes authentication_data = 7;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 5;required int64 chunk_id = 2;required int64 chunk_id = 2;required int64 chunk_id = 2;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional int32 compress_type = 3;optional int32 compress_type = 3;optional int32 compress_type = 3;optional int32 compress_type = 4;optional int32 compress_type = 4;optional int32 compress_type = 4;optional .brpc.policy.SofaCompressType compress_type = 300;
Set the request/response compress type.optional .brpc.policy.SofaCompressType compress_type = 300;
Set the request/response compress type.optional .brpc.policy.SofaCompressType compress_type = 300;
Set the request/response compress type.optional int32 compress_type = 3;optional int32 compress_type = 3;optional int32 compress_type = 3;optional int64 consumed_size = 1;optional int64 consumed_size = 1;optional int64 consumed_size = 1;optional int64 correlation_id = 4;optional int64 correlation_id = 4;optional int64 correlation_id = 4;optional sint64 correlation_id = 3;optional sint64 correlation_id = 3;optional sint64 correlation_id = 3;optional int64 correlation_id = 4;optional int64 correlation_id = 4;optional int64 correlation_id = 4;optional bytes credential_data = 15;optional bytes credential_data = 15;optional bytes credential_data = 15;optional int32 error_code = 1;optional int32 error_code = 1;optional int32 error_code = 1;optional int32 error_code = 201;
The error code if the call is failed.optional int32 error_code = 201;
The error code if the call is failed.optional int32 error_code = 201;
The error code if the call is failed.optional int32 error_code = 1;optional int32 error_code = 1;optional int32 error_code = 1;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional .brpc.policy.SofaCompressType expected_response_compress_type = 301;
Set the response compress type of user expected.optional .brpc.policy.SofaCompressType expected_response_compress_type = 301;
Set the response compress type of user expected.optional .brpc.policy.SofaCompressType expected_response_compress_type = 301;
Set the response compress type of user expected.optional bool failed = 200;
Set as true if the call is failed.optional bool failed = 200;
Set as true if the call is failed.optional bool failed = 200;
Set as true if the call is failed.optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.FrameType frame_type = 3;optional .brpc.FrameType frame_type = 3;optional .brpc.FrameType frame_type = 3;optional bool has_continuation = 4;optional bool has_continuation = 4;optional bool has_continuation = 4;optional int64 log_id = 5;optional int64 log_id = 5;optional int64 log_id = 5;optional int64 log_id = 3;optional int64 log_id = 3;optional int64 log_id = 3;optional string method = 100;
Method full name.optional string method = 100;
Method full name.optional string method = 100;
Method full name.optional string method = 100;
Method full name.optional string method = 100;
Method full name.optional string method = 100;
Method full name.required int32 method_index = 2;required int32 method_index = 2;required int32 method_index = 2;optional string method_name = 14;optional string method_name = 14;optional string method_name = 14;required string method_name = 2;required string method_name = 2;required string method_name = 2;optional string method_name = 14;optional string method_name = 14;optional string method_name = 14;required string method_name = 2;required string method_name = 2;required string method_name = 2;optional bool need_feedback = 2 [default = false];optional bool need_feedback = 2 [default = false];optional bool need_feedback = 2 [default = false];optional int64 parent_span_id = 8;optional int64 parent_span_id = 8;optional int64 parent_span_id = 8;optional int64 parent_span_id = 6;optional int64 parent_span_id = 6;optional int64 parent_span_id = 6;optional string reason = 202;
The error reason if the call is failed.optional string reason = 202;
The error reason if the call is failed.optional string reason = 202;
The error reason if the call is failed.optional string reason = 202;
The error reason if the call is failed.optional string reason = 202;
The error reason if the call is failed.optional string reason = 202;
The error reason if the call is failed.optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.TalkType request_talk_type = 10;optional .brpc.TalkType request_talk_type = 10;optional .brpc.TalkType request_talk_type = 10;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.TalkType response_talk_type = 6;optional .brpc.TalkType response_talk_type = 6;optional .brpc.TalkType response_talk_type = 6;required uint64 sequence_id = 2;
Message sequence id.required uint64 sequence_id = 2;
Message sequence id.required uint64 sequence_id = 2;
Message sequence id.required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;optional int64 source_stream_id = 2;optional int64 source_stream_id = 2;optional int64 source_stream_id = 2;optional int64 span_id = 9;optional int64 span_id = 9;optional int64 span_id = 9;optional int64 span_id = 5;optional int64 span_id = 5;optional int64 span_id = 5;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional int64 trace_id = 7;optional int64 trace_id = 7;optional int64 trace_id = 7;optional int64 trace_id = 4;optional int64 trace_id = 4;optional int64 trace_id = 4;required .brpc.policy.SofaRpcMeta.Type type = 1;required .brpc.policy.SofaRpcMeta.Type type = 1;required .brpc.policy.SofaRpcMeta.Type type = 1;optional bytes user_data = 11;optional bytes user_data = 11;optional bytes user_data = 11;optional bytes user_data = 7;optional bytes user_data = 7;optional bytes user_data = 7;optional int64 user_defined_source_addr = 13;optional int64 user_defined_source_addr = 13;optional int64 user_defined_source_addr = 13;optional int64 user_defined_source_addr = 9;optional int64 user_defined_source_addr = 9;optional int64 user_defined_source_addr = 9;optional int32 user_message_size = 12;optional int32 user_message_size = 12;optional int32 user_message_size = 12;optional int32 user_message_size = 8;optional int32 user_message_size = 8;optional int32 user_message_size = 8;optional bool writable = 3 [default = false];optional bool writable = 3 [default = false];optional bool writable = 3 [default = false];optional int32 attachment_size = 5;optional int32 attachment_size = 5;optional int32 attachment_size = 5;optional bytes authentication_data = 7;optional bytes authentication_data = 7;optional bytes authentication_data = 7;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 5;required int64 chunk_id = 2;required int64 chunk_id = 2;required int64 chunk_id = 2;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional int32 compress_type = 3;optional int32 compress_type = 3;optional int32 compress_type = 3;optional int32 compress_type = 4;optional int32 compress_type = 4;optional int32 compress_type = 4;optional .brpc.policy.SofaCompressType compress_type = 300;
Set the request/response compress type.optional .brpc.policy.SofaCompressType compress_type = 300;
Set the request/response compress type.optional .brpc.policy.SofaCompressType compress_type = 300;
Set the request/response compress type.optional int32 compress_type = 3;optional int32 compress_type = 3;optional int32 compress_type = 3;optional int64 consumed_size = 1;optional int64 consumed_size = 1;optional int64 consumed_size = 1;optional int64 correlation_id = 4;optional int64 correlation_id = 4;optional int64 correlation_id = 4;optional sint64 correlation_id = 3;optional sint64 correlation_id = 3;optional sint64 correlation_id = 3;optional int64 correlation_id = 4;optional int64 correlation_id = 4;optional int64 correlation_id = 4;optional bytes credential_data = 15;optional bytes credential_data = 15;optional bytes credential_data = 15;optional int32 error_code = 1;optional int32 error_code = 1;optional int32 error_code = 1;optional int32 error_code = 201;
The error code if the call is failed.optional int32 error_code = 201;
The error code if the call is failed.optional int32 error_code = 201;
The error code if the call is failed.optional int32 error_code = 1;optional int32 error_code = 1;optional int32 error_code = 1;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional .brpc.policy.SofaCompressType expected_response_compress_type = 301;
Set the response compress type of user expected.optional .brpc.policy.SofaCompressType expected_response_compress_type = 301;
Set the response compress type of user expected.optional .brpc.policy.SofaCompressType expected_response_compress_type = 301;
Set the response compress type of user expected.optional bool failed = 200;
Set as true if the call is failed.optional bool failed = 200;
Set as true if the call is failed.optional bool failed = 200;
Set as true if the call is failed.optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.FrameType frame_type = 3;optional .brpc.FrameType frame_type = 3;optional .brpc.FrameType frame_type = 3;optional bool has_continuation = 4;optional bool has_continuation = 4;optional bool has_continuation = 4;optional int64 log_id = 5;optional int64 log_id = 5;optional int64 log_id = 5;optional int64 log_id = 3;optional int64 log_id = 3;optional int64 log_id = 3;optional string method = 100;
Method full name.optional string method = 100;
Method full name.optional string method = 100;
Method full name.required int32 method_index = 2;required int32 method_index = 2;required int32 method_index = 2;optional string method_name = 14;optional string method_name = 14;optional string method_name = 14;required string method_name = 2;required string method_name = 2;required string method_name = 2;optional bool need_feedback = 2 [default = false];optional bool need_feedback = 2 [default = false];optional bool need_feedback = 2 [default = false];optional int64 parent_span_id = 8;optional int64 parent_span_id = 8;optional int64 parent_span_id = 8;optional int64 parent_span_id = 6;optional int64 parent_span_id = 6;optional int64 parent_span_id = 6;optional string reason = 202;
The error reason if the call is failed.optional string reason = 202;
The error reason if the call is failed.optional string reason = 202;
The error reason if the call is failed.optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.TalkType request_talk_type = 10;optional .brpc.TalkType request_talk_type = 10;optional .brpc.TalkType request_talk_type = 10;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.TalkType response_talk_type = 6;optional .brpc.TalkType response_talk_type = 6;optional .brpc.TalkType response_talk_type = 6;required uint64 sequence_id = 2;
Message sequence id.required uint64 sequence_id = 2;
Message sequence id.required uint64 sequence_id = 2;
Message sequence id.required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;optional int64 source_stream_id = 2;optional int64 source_stream_id = 2;optional int64 source_stream_id = 2;optional int64 span_id = 9;optional int64 span_id = 9;optional int64 span_id = 9;optional int64 span_id = 5;optional int64 span_id = 5;optional int64 span_id = 5;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional int64 trace_id = 7;optional int64 trace_id = 7;optional int64 trace_id = 7;optional int64 trace_id = 4;optional int64 trace_id = 4;optional int64 trace_id = 4;required .brpc.policy.SofaRpcMeta.Type type = 1;required .brpc.policy.SofaRpcMeta.Type type = 1;required .brpc.policy.SofaRpcMeta.Type type = 1;optional bytes user_data = 11;optional bytes user_data = 11;optional bytes user_data = 11;optional bytes user_data = 7;optional bytes user_data = 7;optional bytes user_data = 7;optional int64 user_defined_source_addr = 13;optional int64 user_defined_source_addr = 13;optional int64 user_defined_source_addr = 13;optional int64 user_defined_source_addr = 9;optional int64 user_defined_source_addr = 9;optional int64 user_defined_source_addr = 9;optional int32 user_message_size = 12;optional int32 user_message_size = 12;optional int32 user_message_size = 12;optional int32 user_message_size = 8;optional int32 user_message_size = 8;optional int32 user_message_size = 8;optional bool writable = 3 [default = false];optional bool writable = 3 [default = false];optional bool writable = 3 [default = false];brpc.policy.HuluRpcRequestMetabrpc.policy.HuluRpcRequestMetabrpc.policy.HuluRpcResponseMetabrpc.policy.HuluRpcResponseMetabody_size][meta_size
], 12 bytes in total
body_size and meta_size are NOT in
network byte order (little endian)
Use service->name() and method_index to identify the service and
method to call
user_message_size is set iff request/response has attachment
The following fields of rpc are not supported yet:
chunk_info
optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.Feedback feedback = 5;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.StreamSettings stream_settings = 8;extend .google.protobuf.MethodOptions { ... }DynamicCompositeByteBuf to netty ByteBuf,
the reference count of its underlying buffers are not increased.brpc.ChunkInfobrpc.ChunkInfobrpc.CompressTypebrpc.ConnectionTypebrpc.ProtocolTypebrpc.TalkTypeByteBufPROTOCOL_BAIDU_STD = 1;PROTOCOL_CDS_AGENT = 23;
Reserve special protocol for cds-agent, which depends on FIFO right now
PROTOCOL_DIDX_CLIENT = 15;
Client side only
PROTOCOL_DISP_IDL = 20;
Client side only
PROTOCOL_ERSDA_CLIENT = 21;
Client side only
PROTOCOL_ESP = 24;
Client side only
PROTOCOL_HADOOP_RPC = 11;PROTOCOL_HADOOP_SERVER_RPC = 12;PROTOCOL_HTTP_JSON = 30;
http + json
PROTOCOL_HTTP_PROTOBUF = 29;
http + protobuf
PROTOCOL_HTTP = 6;PROTOCOL_HULU_PBRPC = 3;PROTOCOL_ITP = 18;PROTOCOL_MEMCACHE = 17;
Client side only
PROTOCOL_MONGO = 13;
server side only
PROTOCOL_NOVA_PBRPC = 8;PROTOCOL_NSHEAD_CLIENT = 9;
implemented in baidu-rpc-ub
PROTOCOL_NSHEAD_PROTOBUF = 28;
nshead + protobuf
PROTOCOL_NSHEAD = 10;PROTOCOL_PUBLIC_PBRPC = 7;PROTOCOL_REDIS = 16;
Client side only
PROTOCOL_RTMP = 5;PROTOCOL_SOFA_PBRPC = 4;PROTOCOL_STREAMING_RPC = 2;PROTOCOL_UBRPC_COMPACK = 14;PROTOCOL_UBRPC_MCPACK2 = 22;
Client side only
PROTOCOL_UNKNOWN = 0;readerIndex and increases
the readerIndex by 1 in this buffer.readerIndex and increases the readerIndex
by the number of the transferred bytes (= length).readerIndex
and increases the readerIndex by 2 in this buffer.readerIndex
and increases the readerIndex by 8 in this buffer.readerIndex
in Little Endian Byte Order and increases the readerIndex
by 8 in this buffer.readerIndex
and increases the readerIndex by 4 in this buffer.readerIndex
in Little Endian Byte Order and increases the readerIndex
by 4 in this buffer.readerIndex
and increases the readerIndex by 4 in this buffer.readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 4 in this buffer.readerIndex
and increases the readerIndex by 8 in this buffer.readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 8 in this buffer.CompositeByteBuf which slice the first length of this
composite byte buffer and increases the readerIndex by the size
of the new slice (= length).readerIndex
and increases the readerIndex by 2 in this buffer.readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 2 in this buffer.readerIndex and increases
the readerIndex by 1 in this buffer.readerIndex
and increases the readerIndex by 2 in this buffer.readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 2 in this buffer.REQUEST = 0;extend .google.protobuf.MethodOptions { ... }extend .google.protobuf.MethodOptions { ... }RESPONSE = 1;extend .google.protobuf.MethodOptions { ... }extend .google.protobuf.MethodOptions { ... }CompositeByteBuf which slice the first length of this
composite byte buffer while they maintain separate indexes and marks.extend .google.protobuf.ServiceOptions { ... }optional int32 attachment_size = 5;optional bytes authentication_data = 7;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 6;optional .brpc.ChunkInfo chuck_info = 5;optional .brpc.ChunkInfo chuck_info = 5;required int64 chunk_id = 2;optional .brpc.ChunkInfo chunk_info = 6;optional .brpc.ChunkInfo chunk_info = 6;optional int32 compress_type = 3;optional int32 compress_type = 4;optional .brpc.policy.SofaCompressType compress_type = 300;
Set the request/response compress type.optional int32 compress_type = 3;optional int64 consumed_size = 1;optional int64 correlation_id = 4;optional sint64 correlation_id = 3;optional int64 correlation_id = 4;optional bytes credential_data = 15;optional int32 error_code = 1;optional int32 error_code = 201;
The error code if the call is failed.optional int32 error_code = 1;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional string error_text = 2;optional .brpc.policy.SofaCompressType expected_response_compress_type = 301;
Set the response compress type of user expected.optional bool failed = 200;
Set as true if the call is failed.optional .brpc.Feedback feedback = 5;optional .brpc.Feedback feedback = 5;optional .brpc.FrameType frame_type = 3;optional bool has_continuation = 4;optional int64 log_id = 5;optional int64 log_id = 3;optional string method = 100;
Method full name.optional string method = 100;
Method full name.required int32 method_index = 2;optional string method_name = 14;required string method_name = 2;optional string method_name = 14;required string method_name = 2;optional bool need_feedback = 2 [default = false];optional int64 parent_span_id = 8;optional int64 parent_span_id = 6;optional string reason = 202;
The error reason if the call is failed.optional string reason = 202;
The error reason if the call is failed.optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.policy.RpcRequestMeta request = 1;optional .brpc.TalkType request_talk_type = 10;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.policy.RpcResponseMeta response = 2;optional .brpc.TalkType response_talk_type = 6;required uint64 sequence_id = 2;
Message sequence id.required string service_name = 1;required string service_name = 1;required string service_name = 1;required string service_name = 1;optional int64 source_stream_id = 2;optional int64 span_id = 9;optional int64 span_id = 5;required int64 stream_id = 1;required int64 stream_id = 1;required int64 stream_id = 1;optional .brpc.StreamSettings stream_settings = 8;optional .brpc.StreamSettings stream_settings = 8;optional int64 trace_id = 7;optional int64 trace_id = 4;required .brpc.policy.SofaRpcMeta.Type type = 1;optional bytes user_data = 11;optional bytes user_data = 7;optional int64 user_defined_source_addr = 13;optional int64 user_defined_source_addr = 9;optional int32 user_message_size = 12;optional int32 user_message_size = 8;optional bool writable = 3 [default = false];SOFA_COMPRESS_TYPE_GZIP = 1;SOFA_COMPRESS_TYPE_LZ4 = 4;SOFA_COMPRESS_TYPE_NONE = 0;SOFA_COMPRESS_TYPE_SNAPPY = 3;SOFA_COMPRESS_TYPE_ZLIB = 2;brpc.policy.SofaCompressTypebrpc.policy.SofaRpcMetabrpc.policy.SofaRpcMetabrpc.policy.SofaRpcMeta.Type
Message type.meta_size]
[body_size(64)][message_size(64)],
24 bytes in total
body_size and meta_size are NOT in
network byte order (little endian)
meta of request and response are same, distinguished by SofaRpcMeta#type
sofa-pbrpc does not conduct log_id.brpc.Feedbackbrpc.Feedbackbrpc.FrameTypebrpc.StreamFrameMetabrpc.StreamFrameMetabrpc.StreamSettingsbrpc.StreamSettingsSYS_E2BIG = 7;
Arg list too long
SYS_EACCES = 13;
Permission denied
SYS_EADDRINUSE = 98;
Address already in use
SYS_EADDRNOTAVAIL = 99;
Cannot assign requested address
SYS_EADV = 68;
Advertise error
SYS_EAFNOSUPPORT = 97;
Address family not supported by protocol
SYS_EAGAIN = 11;
Try again
SYS_EALREADY = 114;
Operation already in progress
SYS_EBADE = 52;
Invalid exchange
SYS_EBADF = 9;
Bad file number
SYS_EBADFD = 77;
File descriptor in bad state
SYS_EBADMSG = 74;
Not a data message
SYS_EBADR = 53;
Invalid request descriptor
SYS_EBADRQC = 56;
Invalid request code
SYS_EBADSLT = 57;
Invalid slot
SYS_EBFONT = 59;
Bad font file format
SYS_EBUSY = 16;
Device or resource busy
SYS_ECANCELED = 125;
Operation Cancelled
SYS_ECHILD = 10;
No child processes
SYS_ECHRNG = 44;
Channel number out of range
SYS_ECOMM = 70;
Communication error on send
SYS_ECONNABORTED = 103;
Software caused connection abort
SYS_ECONNREFUSED = 111;
Connection refused
SYS_ECONNRESET = 104;
Connection reset by peer
SYS_EDEADLK = 35;
Resource deadlock would occur
SYS_EDESTADDRREQ = 89;
Destination address required
SYS_EDOM = 33;
Math argument out of domain of func
SYS_EDOTDOT = 73;
RFS specific error
SYS_EDQUOT = 122;
Quota exceeded
SYS_EEXIST = 17;
File exists
SYS_EFAULT = 14;
Bad address
SYS_EFBIG = 27;
File too large
SYS_EHOSTDOWN = 112;
Host is down
SYS_EHOSTUNREACH = 113;
No route to host
SYS_EIDRM = 43;
Identifier removed
SYS_EILSEQ = 84;
Illegal byte sequence
SYS_EINPROGRESS = 115;
Operation now in progress
SYS_EINTR = 4;
Interrupted system call
SYS_EINVAL = 22;
Invalid argument
SYS_EIO = 5;
I/O error
SYS_EISCONN = 106;
Transport endpoint is already connected
SYS_EISDIR = 21;
Is a directory
SYS_EISNAM = 120;
Is a named type file
SYS_EKEYEXPIRED = 127;
Key has expired
SYS_EKEYREJECTED = 129;
Key was rejected by service
SYS_EKEYREVOKED = 128;
Key has been revoked
SYS_EL2HLT = 51;
Level= 2;halted
SYS_EL2NSYNC = 45;
Level= 2;not synchronized
SYS_EL3HLT = 46;
Level= 3;halted
SYS_EL3RST = 47;
Level= 3;reset
SYS_ELIBACC = 79;
Can not access a needed shared library
SYS_ELIBBAD = 80;
Accessing a corrupted shared library
SYS_ELIBEXEC = 83;
Cannot exec a shared library directly
SYS_ELIBMAX = 82;
Attempting to link in too many shared libraries
SYS_ELIBSCN = 81;
.lib section in a.out corrupted
SYS_ELNRNG = 48;
Link number out of range
SYS_ELOOP = 40;
Too many symbolic links encountered
SYS_EMEDIUMTYPE = 124;
Wrong medium type
SYS_EMFILE = 24;
Too many open files
SYS_EMLINK = 31;
Too many links
SYS_EMSGSIZE = 90;
Message too long
SYS_EMULTIHOP = 72;
Multihop attempted
SYS_ENAMETOOLONG = 36;
File name too long
SYS_ENAVAIL = 119;
No XENIX semaphores available
SYS_ENETDOWN = 100;
Network is down
SYS_ENETRESET = 102;
Network dropped connection because of reset
SYS_ENETUNREACH = 101;
Network is unreachable
SYS_ENFILE = 23;
File table overflow
SYS_ENOANO = 55;
No anode
SYS_ENOBUFS = 105;
No buffer space available
SYS_ENOCSI = 50;
No CSI structure available
SYS_ENODATA = 61;
No data available
SYS_ENODEV = 19;
No such device
SYS_ENOENT = 2;
No such file or directory
SYS_ENOEXEC = 8;
Exec format error
SYS_ENOKEY = 126;
Required key not available
SYS_ENOLCK = 37;
No record locks available
SYS_ENOLINK = 67;
Link has been severed
SYS_ENOMEDIUM = 123;
No medium found
SYS_ENOMEM = 12;
Out of memory
SYS_ENOMSG = 42;
No message of desired type
SYS_ENONET = 64;
Machine is not on the network
SYS_ENOPKG = 65;
Package not installed
SYS_ENOPROTOOPT = 92;
Protocol not available
SYS_ENOSPC = 28;
No space left on device
SYS_ENOSR = 63;
Out of streams resources
SYS_ENOSTR = 60;
Device not a stream
SYS_ENOSYS = 38;
Function not implemented
SYS_ENOTBLK = 15;
Block device required
SYS_ENOTCONN = 107;
Transport endpoint is not connected
SYS_ENOTDIR = 20;
Not a directory
SYS_ENOTEMPTY = 39;
Directory not empty
SYS_ENOTNAM = 118;
Not a XENIX named type file
SYS_ENOTSOCK = 88;
Socket operation on non-socket
SYS_ENOTTY = 25;
Not a typewriter
SYS_ENOTUNIQ = 76;
Name not unique on network
SYS_ENXIO = 6;
No such device or address
SYS_EOPNOTSUPP = 95;
Operation not supported on transport endpoint
SYS_EOVERFLOW = 75;
Value too large for defined data type
SYS_EPERM = 1;
option allow_alias = false; this option is available since 2.5.0
Linux system errno are prefixed with SYS_.SYS_EPFNOSUPPORT = 96;
Protocol family not supported
SYS_EPIPE = 32;
Broken pipe
SYS_EPROTO = 71;
Protocol error
SYS_EPROTONOSUPPORT = 93;
Protocol not supported
SYS_EPROTOTYPE = 91;
Protocol wrong type for socket
SYS_ERANGE = 34;
Math result not representable
SYS_EREMCHG = 78;
Remote address changed
SYS_EREMOTE = 66;
Object is remote
SYS_EREMOTEIO = 121;
Remote I/O error
SYS_ERESTART = 85;
Interrupted system call should be restarted
SYS_EROFS = 30;
Read-only file system
SYS_ESHUTDOWN = 108;
Cannot send after transport endpoint shutdown
SYS_ESOCKTNOSUPPORT = 94;
Socket type not supported
SYS_ESPIPE = 29;
Illegal seek
SYS_ESRCH = 3;
No such process
SYS_ESRMNT = 69;
Srmount error
SYS_ESTALE = 116;
Stale NFS file handle
SYS_ESTRPIPE = 86;
Streams pipe error
SYS_ETIME = 62;
Timer expired
SYS_ETIMEDOUT = 110;
Connection timed out.SYS_ETOOMANYREFS = 109;
Too many references: cannot splice
SYS_ETXTBSY = 26;
Text file busy
SYS_EUCLEAN = 117;
Structure needs cleaning
SYS_EUNATCH = 49;
Protocol driver not attached
SYS_EUSERS = 87;
Too many users
SYS_EXDEV = 18;
Cross-device link
SYS_EXFULL = 54;
Exchange full
TALK_TYPE_NORMAL = 0;TALK_TYPE_ONEWAY = 1;FastFutureStore.StoreWalker on every element.Copyright © 2018 Baidu, Inc.. All rights reserved.