| 限定符和类型 | 类和说明 |
|---|---|
class |
HttpRpcProtocol
处理http rpc协议,包括四种序列化格式:
1、http + protobuf
2、http + json
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
HuluRpcProtocol
Notes on HULU PBRPC Protocol:
Header format is ["HULU"][
body_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
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
NSHeadJsonProtocol |
class |
NSHeadProtobufProtocol |
class |
NSHeadRpcProtocol
nshead based protocol, the header format is
NSHead |
| 限定符和类型 | 类和说明 |
|---|---|
class |
PublicPbrpcProtocol |
| 限定符和类型 | 类和说明 |
|---|---|
class |
SofaRpcProtocol
Notes on SOFA PBRPC Protocol:
Header format is ["SOFA"][
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. |
| 限定符和类型 | 类和说明 |
|---|---|
class |
BaiduRpcProtocol
Notes on Baidu RPC Protocol:
Header format is ["PRPC"][
body_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. |
| 限定符和类型 | 类和说明 |
|---|---|
class |
StargateRpcProtocol
Stargate Byte format
head = body体长度,使用一个4位byte表示
+--------------------------------------+----------------+
+ 00000000 00000000 00000000 00000111 | 14 bytes |
+ byte[3] byte[2] byte[1] byte[0] | "HELLO, WORLD" |
+-----------------------------------+----------------+
|
Copyright © 2019 Baidu, Inc.. All rights reserved.