add protobuff
This commit is contained in:
parent
35581b09e6
commit
563ed701ef
@ -60,7 +60,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
|
||||
COMMAND python ../../third_party/tools/scripts/construct/build_pb.py --cpp_out=. --pb_files=ss_proto,ss_msgid --nohooks 1
|
||||
)
|
||||
add_dependencies(masterserver script_pb_protocol)
|
||||
|
||||
|
14
server/tools/protobuild/ss_msgid.proto
Normal file
14
server/tools/protobuild/ss_msgid.proto
Normal file
@ -0,0 +1,14 @@
|
||||
package ss;
|
||||
|
||||
//消息id定义
|
||||
enum SSMessageId_e
|
||||
{
|
||||
_SS_Ping = 8;
|
||||
_SS_Pong = 9;
|
||||
|
||||
_SS_WSP_SocketDisconnect = 10;
|
||||
_SS_WSP_RequestTargetServer = 11;
|
||||
_SS_MS_ResponseTargetServer = 12;
|
||||
_SS_ForceCloseSocket = 13;
|
||||
|
||||
}
|
35
server/tools/protobuild/ss_proto.proto
Executable file
35
server/tools/protobuild/ss_proto.proto
Executable file
@ -0,0 +1,35 @@
|
||||
package ss;
|
||||
|
||||
message SS_Ping
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
message SS_Pong
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
message SS_WSP_SocketDisconnect
|
||||
{
|
||||
}
|
||||
|
||||
message SS_WSP_RequestTargetServer
|
||||
{
|
||||
optional int64 context_id = 1;
|
||||
optional string account_id = 2;
|
||||
optional string team_id = 3;
|
||||
}
|
||||
|
||||
message SS_MS_ResponseTargetServer
|
||||
{
|
||||
optional int32 error_code = 1;
|
||||
optional string error_msg = 2;
|
||||
optional int64 context_id = 3;
|
||||
optional string host = 4;
|
||||
optional int32 port = 5;
|
||||
}
|
||||
|
||||
message SS_ForceCloseSocket
|
||||
{
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user