diff --git a/server/masterserver/CMakeLists.txt b/server/masterserver/CMakeLists.txt index e27615a..9cd38a7 100644 --- a/server/masterserver/CMakeLists.txt +++ b/server/masterserver/CMakeLists.txt @@ -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) diff --git a/server/tools/protobuild/ss_msgid.proto b/server/tools/protobuild/ss_msgid.proto new file mode 100644 index 0000000..0595eb5 --- /dev/null +++ b/server/tools/protobuild/ss_msgid.proto @@ -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; + +} diff --git a/server/tools/protobuild/ss_proto.proto b/server/tools/protobuild/ss_proto.proto new file mode 100755 index 0000000..be04905 --- /dev/null +++ b/server/tools/protobuild/ss_proto.proto @@ -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 +{ +}