This commit is contained in:
aozhiwei 2020-05-03 20:22:28 +08:00
parent 14faa4a76c
commit d809b4cbbf
5 changed files with 77 additions and 12 deletions

View File

@ -53,6 +53,10 @@ execute_process(
COMMAND touch -a ss_proto.pb.cc
COMMAND touch -a ss_msgid.pb.h
COMMAND touch -a ss_msgid.pb.cc
COMMAND touch -a cs_proto.pb.h
COMMAND touch -a cs_proto.pb.cc
COMMAND touch -a cs_msgid.pb.h
COMMAND touch -a cs_msgid.pb.cc
)
aux_source_directory(.
SRC_LIST
@ -69,7 +73,7 @@ add_executable(
add_custom_target(script_pb_protocol ALL)
add_custom_command(TARGET script_pb_protocol
PRE_BUILD
COMMAND python ../../third_party/tools/scripts/construct/build_pb.py --cpp_out=. --pb_files=ss_proto,ss_msgid --nohooks 1
COMMAND python ../../third_party/tools/scripts/construct/build_pb.py --cpp_out=. --pb_files=ss_proto,ss_msgid,cs_msgid,cs_proto --nohooks 1
)
add_dependencies(friend_imserver script_pb_protocol)

View File

@ -0,0 +1,17 @@
package cs;
//id定义
enum CMMessageId_e
{
_CMPing = 101;
_CMJoin = 103;
}
enum SMMessageId_e
{
_SMPing = 101;
_SMRpcError = 102;
_SMJoinedNotify = 103;
}

View File

@ -0,0 +1,16 @@
package cs;
//
enum Constant_e
{
ProtoVersion = 2019071501; //
}
//
message CMPing
{
}
message SMPing
{
optional int32 param1 = 1;
}

View File

@ -5,10 +5,14 @@ enum SSMessageId_e
{
_SS_Ping = 8;
_SS_Pong = 9;
_SS_WSP_SocketDisconnect = 10;
_SS_WSP_RequestTargetServer = 11;
_SS_MS_ResponseTargetServer = 12;
_SS_ForceCloseSocket = 13;
_SS_CMPing = 101;
_SS_SMRpcError = 102;
_SS_CMLogin = 103;
_SS_CMReConnect = 104;
}

View File

@ -1,19 +1,25 @@
package ss;
message SS_Ping
{
}
message SS_Pong
{
}
message SS_WSP_SocketDisconnect
{
}
message SS_CMPing
{
}
message SS_CMLogin_CMReConnect_CommonHead
{
optional int32 server_id = 1;
}
message SS_CMLogin_CMReConnect_CommonHead2
{
optional int32 server_id = 1;
optional string team_uuid = 2;
optional string account_id = 3;
}
message SS_WSP_RequestTargetServer
{
optional int64 context_id = 1;
@ -30,6 +36,24 @@ message SS_MS_ResponseTargetServer
optional int32 port = 5;
}
message SS_SMRpcError
{
optional int32 error_code = 1;
optional string error_msg = 2;
optional string debug_msg = 3;
optional string file = 4;
optional int32 lineno = 5;
}
message SS_Ping
{
}
message SS_Pong
{
optional int32 param1 = 1;
}
message SS_ForceCloseSocket
{
}