Skip to content
Permalink
Browse files
Merge pull request #364 from DatongLi/master
update new_protocol.md doc to add new support protocols
  • Loading branch information
jamesge committed Jun 11, 2018
2 parents 3a03e35 + 81fb9a9 commit 0de8f96deac0dba4aa7bce31197dd11428f48215
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
@@ -22,7 +22,7 @@ brpc就是设计为可随时扩展新协议的,步骤如下:

在[options.proto](https://github.com/brpc/brpc/blob/master/src/brpc/options.proto)的ProtocolType中增加新协议类型,如果你需要的话可以联系我们增加,以确保不会和其他人的需求重合。

目前的ProtocolType(16年底):
目前的ProtocolType(18年中):
```c++
enum ProtocolType {
PROTOCOL_UNKNOWN = 0;
@@ -48,6 +48,10 @@ enum ProtocolType {
PROTOCOL_DISP_IDL = 20; // Client side only
PROTOCOL_ERSDA_CLIENT = 21; // Client side only
PROTOCOL_UBRPC_MCPACK2 = 22; // Client side only
// Reserve special protocol for cds-agent, which depends on FIFO right now
PROTOCOL_CDS_AGENT = 23; // Client side only
PROTOCOL_ESP = 24; // Client side only
PROTOCOL_THRIFT = 25; // Server side only
}
```
## 实现回调
@@ -22,7 +22,7 @@ brpc is designed to add new protocols at any time, just proceed as follows:

Add new protocol type in ProtocolType in [options.proto](https://github.com/brpc/brpc/blob/master/src/brpc/options.proto). If you need to add new protocol, please contact us to add it for you to make sure there is no conflict with protocols of others.

Currently we support in ProtocolType(at the end of 2016):
Currently we support in ProtocolType(at the middle of 2018):
```c++
enum ProtocolType {
PROTOCOL_UNKNOWN = 0;
@@ -48,6 +48,10 @@ enum ProtocolType {
PROTOCOL_DISP_IDL = 20; // Client side only
PROTOCOL_ERSDA_CLIENT = 21; // Client side only
PROTOCOL_UBRPC_MCPACK2 = 22; // Client side only
// Reserve special protocol for cds-agent, which depends on FIFO right now
PROTOCOL_CDS_AGENT = 23; // Client side only
PROTOCOL_ESP = 24; // Client side only
PROTOCOL_THRIFT = 25; // Server side only
}
```
## Implement Callbacks

0 comments on commit 0de8f96

Please sign in to comment.