服务器客户端配置数据与protobuf数据转换流程操作

it2025-08-28  8

hs_cp_res.bat

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::@author pdh ::@function 专门用于将生成的动画、通讯协议、路径资源拷贝到程序对应的路径下 :: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: echo off set OLD_PATH=%cd% set SRC_TOOL_PATH=..\..\doc\tools echo "path = "%OLD_PATH% set PRJ_PATH=..\..\clt\Fishing1.0 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::: 拷贝策划的游戏数值资源 set DST_STATIC_DATA_PATH=%PRJ_PATH%\src\Game\module\Game\fish\static_data echo "拷贝策划的游戏数值资源。拷贝到 "%DST_STATIC_DATA_PATH% set SRC_DATA_PATH=%OLD_PATH%\..\..\doc\数据表 cd /d %SRC_DATA_PATH% set READ_EXCEL_BAT=ReadExcel.bat if exist %READ_EXCEL_BAT% ( call %READ_EXCEL_BAT% ) else ( echo "Not found READ_EXCEL_BAT="%READ_EXCEL_BAT% pause ) cd /d %OLD_PATH% set DST_SD_PATH=%PRJ_PATH%\src\Game\module\Game\fish\static_data\ xcopy %SRC_DATA_PATH%\static_data_ts %DST_SD_PATH% /E /D /Y :::破解的奥迪路径太大,无法打包TS程序。放到asset/way中 del /S /Q %DST_SD_PATH%\SD_fishformation.ts echo "拷贝策划数值资源成功 "%DST_STATIC_DATA_PATH% :::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::: 拷贝动画资源 echo. echo. echo. set DST_ANIM_PATH=%OLD_PATH%\resource\assets\games\fish_res\animation set SRC_ANIM_PATH=%SRC_TOOL_PATH%\tool_animation echo "拷贝动画资源到 "%DST_ANIM_PATH% if not exist %SRC_ANIM_PATH% ( echo "SRC_ANIM_PATH is not exist. "%SRC_ANIM_PATH% pause exit 1 ) rmdir /S /Q %DST_ANIM_PATH% md %DST_ANIM_PATH% xcopy %SRC_ANIM_PATH% %DST_ANIM_PATH% /E /D /Y del /S /Q %DST_ANIM_PATH%\*.txt del /S /Q %DST_ANIM_PATH%\*.tmc echo "拷贝动画资源成功 "%DST_ANIM_PATH% cd /d %OLD_PATH% :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::拷贝鱼路径资源 echo. echo. echo. set DST_WAY_PATH=%OLD_PATH%\resource\assets\games\fish_res\way set SRC_WAY_PATH=%SRC_TOOL_PATH%\tool_fishpath\Paths echo "拷贝鱼路径资源到 "%DST_WAY_PATH% if not exist %SRC_WAY_PATH% ( echo "SRC_WAY_PATH is not exist. "%SRC_WAY_PATH% pause exit 1 ) rmdir /S /Q %DST_WAY_PATH% md %DST_WAY_PATH% xcopy %SRC_WAY_PATH% %DST_WAY_PATH% /E /D /Y REM del /S /Q %DST_WAY_PATH%\path*.xml echo "拷贝鱼路径资源成功 "%DST_WAY_PATH% cd /d %OLD_PATH% ::::奥迪路径文件太大,写成ts文件无法打包。放到asset/way中作为资源加载 set SRC_FISH_FORMATION=%SRC_DATA_PATH%\static_data_ts\SD_fishformation.ts set DST_FISH_FORMATION=%DST_WAY_PATH%\SD_fishformation.txt echo %SRC_FISH_FORMATION% echo %DST_FISH_FORMATION% copy %SRC_FISH_FORMATION% %DST_FISH_FORMATION% /Y :::::::::::::::::::::::::::::::::::::::::::::::::::::: :::将protobuf协议转换后放到客户端代码中 set PROTO_PATH=..\..\protocol cd /d %PROTO_PATH% set PROTO_EXE=c2s协议客户端转换.bat if not exist %PROTO_EXE% ( echo "PROTO_EXE is not exist. "%PROTO_EXE% pause exit 1 ) call %PROTO_EXE% cd %OLD_PATH% @echo 拷贝msgid文件 xcopy ..\..\protocol\c2s\tsout\*.ts %OLD_PATH%\src\Game\module\Game\fish\net\protobuf\ /Y @echo 拷贝proto文件 xcopy ..\..\protocol\c2s\*.proto %OLD_PATH%\protobuf\protofile\ /Y @echo 执行pb-egret generate cd %OLD_PATH%\protobuf\ call %OLD_PATH%\hs_pb.bat :::跳转回原始路径下 echo "back--"%cd% cd /d %OLD_PATH% pause

hs_pb.bat

@echo ---执行pb-egret generate set CUR_PATH=%cd% echo "PB PATH = "%CUR_PATH% pb-egret generate cd %CUR_PATH%

生成消息ID.bat

@echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit :begin REM python make_msg_id.py %pause%

生成PB文件.bat

@echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit :begin REM cd .\c2s REM for %%i in (*.proto) do ( REM ..\protoc.exe --cpp_out=.\cppout\ %%i REM ) for %%i in (*.proto) do ( ..\protoc.exe --python_out=.\pythonout\ %%i ) REM for %%i in (*.proto) do ( REM ..\protoc.exe --js_out=.\jsout\ %%i REM ) REM for %%i in (*.proto) do ( REM ..\protoc.exe --ts_out=.\tsout\ %%i REM ) cd ..\ REM cd .\s2s REM for %%i in (*.proto) do ( REM ..\protoc.exe --cpp_out=.\cppout\ %%i REM ) REM for %%i in (*.proto) do ( REM ..\protoc.exe --python_out=.\pythonout\ %%i REM ) %pause%

c2s协议服务端转换.bat

cd %cd% @echo %cd% start 生成消息ID.bat @ping -n 2 127.1 >nul start 生成PB文件.bat @ping -n 2 127.1 >nul start copy_proto.bat @ping -n 2 127.1 >nul echo "finish transfer" pause

c2s协议客户端转换.bat

@echo off cd %cd% @echo %cd% @echo 生成msgid python make_msg_id_client.py @echo 操作完成 cd %cd%

c2s协议go端转换.bat

@echo off cd %cd% @echo %cd% @echo 生成msgid python make_msg_id_go.py @echo 生成pb文件 cd .\c2s for %%i in (*.proto) do ( ..\protoc.exe --go_out=.\goout\ %%i ) @echo 拷贝msgid文件 xcopy .\goout\C2SMsgId.go ..\..\svr\fishingrobot\src\fishingproto\ @echo 拷贝pb的go文件 cd ..\ python copy_pb_go.py @echo 完成 pause

copy_pb_go.py

import os import sys import shutil # proto_file_folder_list = [r'\\c2s', r'\\s2s'] 此版本中只有c2s proto_file_folder_list = [r'\c2s'] out_file_folder_go = r'\goout' old_postfix = 'proto' new_postfix_go = 'go' cur_path = os.getcwd() proto_file_path = "" out_file_path_go = "" def copy_go_file(dest_file_name_with_postfix): print(dest_file_name_with_postfix) source_file = out_file_path_go + "\\" + dest_file_name_with_postfix.split('.')[0] + ".pb." + "go" target_dir = "..\\svr\\fishingrobot\\src\\fishingproto\\" + dest_file_name_with_postfix.split('.')[0].lower() + "pb" target_file = target_dir + "\\" + dest_file_name_with_postfix.split('.')[0] + ".pb." + "go" print(source_file) print(target_dir) print(target_file) dirExist = os.path.exists(target_dir) if not dirExist: os.makedirs(target_dir) shutil.copyfile(source_file, target_file) for i in range(0, len(proto_file_folder_list)): proto_file_folder = proto_file_folder_list[i] proto_file_path = cur_path + proto_file_folder out_file_path_go = proto_file_path + out_file_folder_go print(out_file_path_go) file_list = os.listdir(proto_file_path) for file_obj in file_list: file_path = os.path.join(proto_file_path, file_obj) cur_file_postfix = str(file_obj.split('.')[-1]) if cur_file_postfix == old_postfix: source_file_name_with_postfix = str(file_path.split('\\')[-1]) new_file_name_with_postfix = str(source_file_name_with_postfix.split('.')[0]) + '.' + new_postfix_go copy_go_file(new_file_name_with_postfix)

copy_proto_client.bat

@echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit :begin REM REM xcopy .\c2s\cppout\*.pb.cc ..\..\cppserver\server1.0\src\protocol\c2s\ /Y REM xcopy .\c2s\cppout\*.h ..\..\cppserver\server1.0\src\protocol\c2s\ /Y xcopy .\c2s\pythonout\*.py ..\svr\fishingserver1.0\protocol\c2s\ /Y REM xcopy .\s2s\cppout\*.pb.cc ..\..\cppserver\server1.0\src\protocol\s2s\ /Y REM xcopy .\s2s\cppout\*.h ..\..\cppserver\server1.0\src\protocol\s2s\ /Y REM xcopy .\s2s\pythonout\*.py ..\..\pythonserver\catchfish1.0\protocol\s2s\ /Y %pause%

copy_proto.bat

@echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit :begin REM REM xcopy .\c2s\cppout\*.pb.cc ..\..\cppserver\server1.0\src\protocol\c2s\ /Y REM xcopy .\c2s\cppout\*.h ..\..\cppserver\server1.0\src\protocol\c2s\ /Y xcopy .\c2s\pythonout\*.py ..\svr\fishingserver1.2\protocol\c2s\ /Y REM xcopy .\s2s\cppout\*.pb.cc ..\..\cppserver\server1.0\src\protocol\s2s\ /Y REM xcopy .\s2s\cppout\*.h ..\..\cppserver\server1.0\src\protocol\s2s\ /Y REM xcopy .\s2s\pythonout\*.py ..\..\pythonserver\catchfish1.0\protocol\s2s\ /Y %pause%

make_msg_id_client.py

# -*- coding: utf-8 -*- import os import sys # proto_file_folder_list = [r'\\c2s', r'\\s2s'] 此版本中只有c2s proto_file_folder_list = [r'c2s'] out_file_folder_ts = r'tsout' old_postfix = 'txt' new_postfix_ts = 'ts' cur_path = os.getcwd() proto_file_path = "" out_file_path_ts = "" def create_ts_file(source_file_name_with_postfix, dest_file_name_with_postfix): print(source_file_name_with_postfix) print(dest_file_name_with_postfix) if not os.path.isdir(out_file_path_ts): os.makedirs(out_file_path_ts) pt = os.path.sep.join((out_file_path_ts, dest_file_name_with_postfix)) f = open(pt, 'w', encoding='UTF-8') file_name = source_file_name_with_postfix.split('.')[0] f.writelines(u'//程序自动生成,消息id文件\n') f.writelines('class ' + file_name + '{' + '\n') # 先写协议名称,再写根据id得到名称 pt = os.path.sep.join((proto_file_path, source_file_name_with_postfix)) with open(pt, "r", encoding='UTF-8') as read: while True: line = read.readline() if not line: break str_line = line.strip() if not len(str_line): continue sp = str_line.split() if len(sp) != 3: print("error line={} , sp[{}]".format(line, sp)) sys.exit(0) continue name = sp[0] id_key = sp[1] note = sp[2] new_line = ' public static ' + name.upper() + ':string = "' + \ name + '"; // ' + note f.writelines(new_line) f.writelines('\n') f.writelines('\n') f.writelines(' public static getClassNameById(msgId:number):string {\n') f.writelines(' switch(msgId) {\n') pt = os.path.sep.join((proto_file_path, source_file_name_with_postfix)) with open(pt, "r", encoding='UTF-8') as read: while True: line = read.readline() if not line: break str_line = line.strip() if not str_line: continue sp = str_line.split() if len(sp) != 3: print("error line={}, sp={}".format(line, sp)) continue name = sp[0] id_key = sp[1] note = sp[2] new_line = ' case ' + id_key + ' :\n' f.writelines(new_line) new_line = ' return ' + file_name + '.' + name.upper() + ';\n' f.writelines(new_line) f.writelines(' }\n') f.writelines(' return null;\n') f.writelines(' }\n') f.writelines('\n') f.writelines(' public static msgId(msgName:string):number {\n') f.writelines(' switch(msgName) {\n') pt = os.path.sep.join((proto_file_path, source_file_name_with_postfix)) with open(pt, "r", encoding='UTF-8') as read: while True: line = read.readline() if not line: break str_line = line.strip() if not str_line: continue sp = line.split() if len(sp) != 3: print("error line={}, sp={}".format(line, sp)) continue name = sp[0] id_key = sp[1] note = sp[2] new_line = ' case ' + file_name + '.' + name.upper() + ' :\n' f.writelines(new_line) new_line = ' return ' + id_key + ';\n' f.writelines(new_line) f.writelines(' }\n') f.writelines(' return -1;\n') f.writelines(' }\n') f.writelines('\n') f.writelines('}') f.close() for i in range(0, len(proto_file_folder_list)): proto_file_folder = proto_file_folder_list[i] proto_file_path = os.path.sep.join((cur_path, proto_file_folder)) out_file_path_ts = os.path.sep.join((proto_file_path, out_file_folder_ts)) file_list = os.listdir(proto_file_path) for file_obj in file_list: file_path = os.path.sep.join((proto_file_path, file_obj)) cur_file_postfix = str(file_obj.split('.')[-1]) if cur_file_postfix == old_postfix: source_file_name_with_postfix = str( file_path.split(os.path.sep)[-1]) new_file_name_with_postfix = str(source_file_name_with_postfix.split('.')[ 0]) + '.' + new_postfix_ts print("create_ts_file {},{}".format( source_file_name_with_postfix, new_file_name_with_postfix)) create_ts_file(source_file_name_with_postfix, new_file_name_with_postfix)

make_msg_id_go.py

import os import sys import shutil # proto_file_folder_list = [r'\\c2s', r'\\s2s'] 此版本中只有c2s proto_file_folder_list = [r'\\c2s'] out_file_folder_go = r'\\goout' old_postfix = 'txt' new_postfix_go = 'go' cur_path = os.getcwd() proto_file_path = "" out_file_path_go = "" def create_go_file(source_file_name_with_postfix, dest_file_name_with_postfix): print(source_file_name_with_postfix) print(dest_file_name_with_postfix) f = open(out_file_path_go + '\\' + dest_file_name_with_postfix,'w', encoding='UTF-8') file_name = source_file_name_with_postfix.split('.')[0] f.writelines(u'//程序自动生成,消息id文件\n') f.writelines('\n') f.writelines('package fishingproto\n') f.writelines('\n') f.writelines('const (\n') # 先写协议名称,再写根据id得到名称 for line in open(proto_file_path + '\\' + source_file_name_with_postfix,"r", encoding='UTF-8'): str_line = line.strip() if not len(str_line): continue index_space = str_line.find("\t") name = str_line[0:index_space] str_line = str_line[index_space:] str_line = str_line.strip() index_space = str_line.find("\t") id_key = str_line[0:index_space] str_line = str_line[index_space:] str_line = str_line.strip() note = str_line new_line = ' '+ name + ' = ' + id_key + '\t\t// ' + note f.writelines(new_line) f.writelines('\n') f.writelines(')') f.close() for i in range(0, len(proto_file_folder_list)): proto_file_folder = proto_file_folder_list[i] proto_file_path = cur_path + proto_file_folder out_file_path_go = proto_file_path + out_file_folder_go file_list = os.listdir(proto_file_path) for file_obj in file_list: file_path = os.path.join(proto_file_path, file_obj) cur_file_postfix = str(file_obj.split('.')[-1]) if cur_file_postfix == old_postfix: source_file_name_with_postfix = str(file_path.split('\\')[-1]) new_file_name_with_postfix = str(source_file_name_with_postfix.split('.')[0]) + '.' + new_postfix_go create_go_file(source_file_name_with_postfix, new_file_name_with_postfix)

make_msg_id.py

import os import sys import shutil # proto_file_folder_list = [r'\\c2s', r'\\s2s'] 此版本中只有c2s proto_file_folder_list = [r'\\c2s'] out_file_folder_cpp = r'\\cppout' out_file_folder_py = r'\\pythonout' old_postfix = 'txt' new_postfix_cpp = 'h' new_postfix_py = 'py' cur_path = os.getcwd() proto_file_path = "" out_file_path_cpp = "" out_file_path_py = "" def create_python_file(source_file_name_with_postfix, dest_file_name_with_postfix): f = open(out_file_path_py + '\\' + dest_file_name_with_postfix,'w', encoding='UTF-8') file_name = source_file_name_with_postfix.split('.')[0].upper() f.writelines('from enum import Enum') f.writelines('\n') f.writelines('\n') f.writelines('\n') f.writelines('class ' + file_name + '(Enum):' + '\n') for line in open(proto_file_path + '\\' + source_file_name_with_postfix,"r", encoding='UTF-8'): str_line = line.strip() if not len(str_line): continue index_space = str_line.find("\t") name = str_line[0:index_space] str_line = str_line[index_space:] str_line = str_line.strip() index_space = str_line.find("\t") id_key = str_line[0:index_space] str_line = str_line[index_space:] str_line = str_line.strip() note = str_line new_line = name + ' = ' + id_key + ' # ' + note # name = str_line.split('\t')[0] # id_key = str_line.split('\t')[1] # note = str_line.split('\t')[2] #new_line = name + ' = ' + id_key + ' # ' + note #new_line = "" #index_space = str_line.find(' ') # while index_space != -1: # find_field = str_line[0:index_space] # print("find_field:%s" % find_field) # new_line += find_field # str_line = str_line[index_space:] # str_line = str_line.strip() # index_space = str_line.find(' ') f.writelines(' ' + new_line) f.writelines('\n') f.close() def create_cpp_header_file(source_file_name_with_postfix, dest_file_name_with_postfix): f = open(out_file_path_cpp + '\\' + dest_file_name_with_postfix, 'w', encoding='UTF-8') file_name = source_file_name_with_postfix.split('.')[0].upper() f.writelines('#ifndef ' + '_' + file_name + '_H_' + '\n') f.writelines('#define ' + '_' + file_name + '_H_' + '\n') f.writelines('#pragma once' + '\n') f.writelines('struct ' + file_name + '\n') f.writelines('{' + '\n') f.writelines('\t' + 'enum ' + file_name + '_ENUM' + '\n') f.writelines('\t{' + '\n') for line in open(proto_file_path + '\\' + source_file_name_with_postfix,"r", encoding='UTF-8'): str_line = line.strip() if not len(str_line): continue name = str(str_line.split('\t')[0].strip()) print("name:%s, len:%d"%(name, len(name))) id_key = (str_line.split('\t')[1]).strip() note = (str_line.split('\t')[2]).strip() new_line = name + '\t=' + id_key + ',// ' + note f.writelines('\t\t' + new_line) f.writelines('\n') f.writelines('\n') f.writelines('\t};' + '\n') f.writelines('};' + '\n') f.writelines('#endif' + '\n') f.close() for i in range(0, len(proto_file_folder_list)): proto_file_folder = proto_file_folder_list[i] proto_file_path = cur_path + proto_file_folder out_file_path_cpp = proto_file_path + out_file_folder_cpp out_file_path_py = proto_file_path + out_file_folder_py file_list = os.listdir(proto_file_path) for file_obj in file_list: file_path = os.path.join(proto_file_path, file_obj) cur_file_postfix = str(file_obj.split('.')[-1]) if cur_file_postfix == old_postfix: source_file_name_with_postfix = str(file_path.split('\\')[-1]) # new_file_name_with_postfix = str(source_file_name_with_postfix.split('.')[0]) + '.' + new_postfix_cpp 此版本不需要c++ # create_cpp_header_file(source_file_name_with_postfix, new_file_name_with_postfix) new_file_name_with_postfix = str(source_file_name_with_postfix.split('.')[0]) + '.' + new_postfix_py create_python_file(source_file_name_with_postfix, new_file_name_with_postfix)

C2SMsgId.txt

CommonPb_TestMsg 901 测试用的网络消息 CommonPb_ErrorMsgPush 902 服务端向客户端推送错误信息 CommonPb_HintStrPush 903 服务端向客户端推送提示字符串 LoginPb_HeartBeatRequest 1001 客户端向服务端发送的心跳包 LoginPb_HeartBeatReply 5001 服务端向客户端返回心跳包 LoginPb_ServerTimeRequest 1002 客户端向服务端请求同步时间 LoginPb_ServerTimeReply 5002 服务端向客户端同步时间 LoginPb_LoginRequest 1003 客户端请求登录 LoginPb_LoginReply 5003 服务端返回登录 LoginPb_SomeWhereElseLoginPush 5004 服务端推送客户端在其他地方登录 LoginPb_RoleGoldChangePush 5005 服务端推送用户金币改变 LoginPb_RobotLoginRequest 1006 机器人登录请求 LoginPb_AppLoginRequest 1007 从app登录请求 LoginPb_BrokenReconnectRequest 1008 断线重连请求 LoginPb_BrokenReconnectReply 5008 断线重连返回 LoginPb_TokenOrNetCutPush 5009 服务端推送客户端token错误或已经断线 FightPb_MultipleRoomListRequest 1201 客户端请求倍率房间列表 FightPb_MultipleRoomListReply 5201 服务端返回倍率房间列表 FightPb_EnterMultipleRoomRequest 1202 客户端请求进入倍率房间 FightPb_EnterMultipleRoomReply 5202 服务端返回进入倍率房间 FightPb_LeaveMultipleRoomRequest 1203 客户端请求退出倍率房间 FightPb_LeaveMultipleRoomReply 5203 服务端返回退出倍率房间 FightPb_SyncMultipleRoomPlayer 5204 服务端向客户端同步其他玩家进入房间 FightPb_SyncMultipleRoomPlayerOut 5205 服务端向客户端同步其他玩家离开房间 FightPb_ChangeCannonMultipleRequest 1206 客户端请求切换炮倍率 FightPb_ChangeCannonMultipleReply 5206 服务端返回切换炮倍率 FightPb_SyncCannonMultipleChange 5207 服务端向客户端同步其他玩家炮倍率变化 FightPb_SyncMultipleRoomFishCreate 5208 服务端向客户端推送房间里的鱼生成 FightPb_SyncMultipleRoomFishDestroy 5209 服务端向客户端推送房间里的鱼销毁 FightPb_LaunchBulletRequest 1210 客户端向服务端请求发射子弹 FightPb_LaunchBulletReply 5210 服务端向客户端返回发射子弹 FightPb_SyncLaunchBullet 5211 服务端向客户端同步子弹发射 FightPb_BulletHitFishRequest 1212 客户端向服务端请求子弹打中鱼 FightPb_BulletHitFishReply 5212 服务端向客户端返回子弹打中鱼 FightPb_SyncBulletHitFish 5213 服务端向客户端同步子弹打中鱼 FightPb_BulletKillFishPush 5214 服务端向客户端推送子弹打爆鱼 FightPb_SyncBulletKillFish 5215 服务端向客户端同步子弹打爆鱼 FightPb_SyncGoldChange 5216 服务端向客户端同步其他玩家金币变化 FightPb_FishTidePush 5217 服务端向客户端推送渔潮 FightPb_LockFishRequest 1218 客户端向服务端请求锁定鱼 FightPb_LockFishReply 5218 服务端向客户端返回锁定鱼 FightPb_SyncLockFish 5219 服务端向客户端同步其他玩家锁定鱼的情况 FightPb_FocusMultipleRoomRequest 1220 客户端请求在倍率房间重新得到焦点 FightPb_FocusMultipleRoomReply 5220 服务端返回在倍率房间重新得到焦点 FightPb_BossComePush 5221 服务端向客户端推送BOSS来了 FightPb_RoomInfoListToRobotPush 5222 服务端每隔段时间向机器人客户端推送房间信息

Login.proto

syntax = "proto3"; package LoginPb; option optimize_for = LITE_RUNTIME; // 客户端用的角色信息数据结构 message ClientRoleInfo { int32 role_id = 1; // 角色id string role_name = 2; // 角色名字 int32 sex = 3; // 性别,0男,1女 int32 diamond = 4; // 钻石 int64 gold = 5; // 金币 int32 face_id = 6; // 头像id } // 客户端向服务端发送的心跳包 message HeartBeatRequest { } // 服务端向客户端返回心跳包 message HeartBeatReply { } // 客户端向服务端请求同步时间 message ServerTimeRequest { int64 client_time = 1; // 客户端时间 } // 服务端向客户端同步时间 message ServerTimeReply { int64 client_time = 1; // 客户端时间 int64 server_time = 2; // 服务器时间 } // 客户端请求登录 message LoginRequest { string account = 1; // 账号 } // 服务端返回登录 message LoginReply { int32 error = 1; // 0 表示成功,1 密码错误 int32 token_id = 2; // 服务端针对每个客户端的tokenId ClientRoleInfo role_info = 3; int32 rebound_number = 4; // 反弹次数 } // 服务端推送客户端在其他地方登录 message SomeWhereElseLoginPush { } // 服务端推送用户金币改变(目前只在玩家发射炮弹时用到,打中鱼不发此消息) message RoleGoldChangePush { int64 gold = 1; // 金币 } // 机器人登录请求 message RobotLoginRequest { int64 login_time = 1; // 登录时间 int32 role_id = 2; // 用户id string sign = 3; // 密码字符串,固定为"dfb7425b49a246c1939296804df398c2" int32 room_static_id = 4; // 目标房间id,目前取2,3,4。服务端用来给机器人设金币 } // 从app登录请求 message AppLoginRequest { string app_token = 1; // 平台token } // 断线重连请求 (返回2种情况:1:断线时间太长,返回错误提示;2:) message BrokenReconnectRequest { int32 role_id = 1; // 用户id int32 token_id = 2; // 服务端针对每个客户端的tokenId } // 断线重连返回 message BrokenReconnectReply { int32 error = 1; // 0 表示成功,1 错误 } // 服务端推送客户端token错误或已经断线 message TokenOrNetCutPush { int32 error = 1; // 0 表示成功,1 错误 }

 

ptotoc.exe

https://download.csdn.net/download/wulong710/13008286

转换后结果:

python版本结果:

C2SMsgId.py

from enum import Enum class C2SMSGID(Enum): CommonPb_TestMsg = 901 # 测试用的网络消息 CommonPb_ErrorMsgPush = 902 # 服务端向客户端推送错误信息 CommonPb_HintStrPush = 903 # 服务端向客户端推送提示字符串 LoginPb_HeartBeatRequest = 1001 # 客户端向服务端发送的心跳包 LoginPb_HeartBeatReply = 5001 # 服务端向客户端返回心跳包 LoginPb_ServerTimeRequest = 1002 # 客户端向服务端请求同步时间 LoginPb_ServerTimeReply = 5002 # 服务端向客户端同步时间 LoginPb_LoginRequest = 1003 # 客户端请求登录 LoginPb_LoginReply = 5003 # 服务端返回登录 LoginPb_SomeWhereElseLoginPush = 5004 # 服务端推送客户端在其他地方登录 LoginPb_RoleGoldChangePush = 5005 # 服务端推送用户金币改变 LoginPb_RobotLoginRequest = 1006 # 机器人登录请求 LoginPb_AppLoginRequest = 1007 # 从app登录请求 LoginPb_BrokenReconnectRequest = 1008 # 断线重连请求 LoginPb_BrokenReconnectReply = 5008 # 断线重连返回 LoginPb_TokenOrNetCutPush = 5009 # 服务端推送客户端token错误或已经断线 FightPb_MultipleRoomListRequest = 1201 # 客户端请求倍率房间列表 FightPb_MultipleRoomListReply = 5201 # 服务端返回倍率房间列表 FightPb_EnterMultipleRoomRequest = 1202 # 客户端请求进入倍率房间 FightPb_EnterMultipleRoomReply = 5202 # 服务端返回进入倍率房间 FightPb_LeaveMultipleRoomRequest = 1203 # 客户端请求退出倍率房间 FightPb_LeaveMultipleRoomReply = 5203 # 服务端返回退出倍率房间 FightPb_SyncMultipleRoomPlayer = 5204 # 服务端向客户端同步其他玩家进入房间 FightPb_SyncMultipleRoomPlayerOut = 5205 # 服务端向客户端同步其他玩家离开房间 FightPb_ChangeCannonMultipleRequest = 1206 # 客户端请求切换炮倍率 FightPb_ChangeCannonMultipleReply = 5206 # 服务端返回切换炮倍率 FightPb_SyncCannonMultipleChange = 5207 # 服务端向客户端同步其他玩家炮倍率变化 FightPb_SyncMultipleRoomFishCreate = 5208 # 服务端向客户端推送房间里的鱼生成 FightPb_SyncMultipleRoomFishDestroy = 5209 # 服务端向客户端推送房间里的鱼销毁 FightPb_LaunchBulletRequest = 1210 # 客户端向服务端请求发射子弹 FightPb_LaunchBulletReply = 5210 # 服务端向客户端返回发射子弹 FightPb_SyncLaunchBullet = 5211 # 服务端向客户端同步子弹发射 FightPb_BulletHitFishRequest = 1212 # 客户端向服务端请求子弹打中鱼 FightPb_BulletHitFishReply = 5212 # 服务端向客户端返回子弹打中鱼 FightPb_SyncBulletHitFish = 5213 # 服务端向客户端同步子弹打中鱼 FightPb_BulletKillFishPush = 5214 # 服务端向客户端推送子弹打爆鱼 FightPb_SyncBulletKillFish = 5215 # 服务端向客户端同步子弹打爆鱼 FightPb_SyncGoldChange = 5216 # 服务端向客户端同步其他玩家金币变化 FightPb_FishTidePush = 5217 # 服务端向客户端推送渔潮 FightPb_LockFishRequest = 1218 # 客户端向服务端请求锁定鱼 FightPb_LockFishReply = 5218 # 服务端向客户端返回锁定鱼 FightPb_SyncLockFish = 5219 # 服务端向客户端同步其他玩家锁定鱼的情况 FightPb_FocusMultipleRoomRequest = 1220 # 客户端请求在倍率房间重新得到焦点 FightPb_FocusMultipleRoomReply = 5220 # 服务端返回在倍率房间重新得到焦点 FightPb_BossComePush = 5221 # 服务端向客户端推送BOSS来了 FightPb_RoomInfoListToRobotPush = 5222 # 服务端每隔段时间向机器人客户端推送房间信息

Login_pb2.py

# Generated by the protocol buffer compiler. DO NOT EDIT! # source: Login.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='Login.proto', package='LoginPb', syntax='proto3', serialized_pb=_b('\n\x0bLogin.proto\x12\x07LoginPb\"q\n\x0e\x43lientRoleInfo\x12\x0f\n\x07role_id\x18\x01 \x01(\x05\x12\x11\n\trole_name\x18\x02 \x01(\t\x12\x0b\n\x03sex\x18\x03 \x01(\x05\x12\x0f\n\x07\x64iamond\x18\x04 \x01(\x05\x12\x0c\n\x04gold\x18\x05 \x01(\x03\x12\x0f\n\x07\x66\x61\x63\x65_id\x18\x06 \x01(\x05\"\x12\n\x10HeartBeatRequest\"\x10\n\x0eHeartBeatReply\"(\n\x11ServerTimeRequest\x12\x13\n\x0b\x63lient_time\x18\x01 \x01(\x03\";\n\x0fServerTimeReply\x12\x13\n\x0b\x63lient_time\x18\x01 \x01(\x03\x12\x13\n\x0bserver_time\x18\x02 \x01(\x03\"\x1f\n\x0cLoginRequest\x12\x0f\n\x07\x61\x63\x63ount\x18\x01 \x01(\t\"q\n\nLoginReply\x12\r\n\x05\x65rror\x18\x01 \x01(\x05\x12\x10\n\x08token_id\x18\x02 \x01(\x05\x12*\n\trole_info\x18\x03 \x01(\x0b\x32\x17.LoginPb.ClientRoleInfo\x12\x16\n\x0erebound_number\x18\x04 \x01(\x05\"\x18\n\x16SomeWhereElseLoginPush\"\"\n\x12RoleGoldChangePush\x12\x0c\n\x04gold\x18\x01 \x01(\x03\"^\n\x11RobotLoginRequest\x12\x12\n\nlogin_time\x18\x01 \x01(\x03\x12\x0f\n\x07role_id\x18\x02 \x01(\x05\x12\x0c\n\x04sign\x18\x03 \x01(\t\x12\x16\n\x0eroom_static_id\x18\x04 \x01(\x05\"$\n\x0f\x41ppLoginRequest\x12\x11\n\tapp_token\x18\x01 \x01(\t\";\n\x16\x42rokenReconnectRequest\x12\x0f\n\x07role_id\x18\x01 \x01(\x05\x12\x10\n\x08token_id\x18\x02 \x01(\x05\"%\n\x14\x42rokenReconnectReply\x12\r\n\x05\x65rror\x18\x01 \x01(\x05\"\"\n\x11TokenOrNetCutPush\x12\r\n\x05\x65rror\x18\x01 \x01(\x05\x42\x02H\x03\x62\x06proto3') ) _CLIENTROLEINFO = _descriptor.Descriptor( name='ClientRoleInfo', full_name='LoginPb.ClientRoleInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='role_id', full_name='LoginPb.ClientRoleInfo.role_id', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='role_name', full_name='LoginPb.ClientRoleInfo.role_name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sex', full_name='LoginPb.ClientRoleInfo.sex', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='diamond', full_name='LoginPb.ClientRoleInfo.diamond', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='gold', full_name='LoginPb.ClientRoleInfo.gold', index=4, number=5, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='face_id', full_name='LoginPb.ClientRoleInfo.face_id', index=5, number=6, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=24, serialized_end=137, ) _HEARTBEATREQUEST = _descriptor.Descriptor( name='HeartBeatRequest', full_name='LoginPb.HeartBeatRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=139, serialized_end=157, ) _HEARTBEATREPLY = _descriptor.Descriptor( name='HeartBeatReply', full_name='LoginPb.HeartBeatReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=159, serialized_end=175, ) _SERVERTIMEREQUEST = _descriptor.Descriptor( name='ServerTimeRequest', full_name='LoginPb.ServerTimeRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='client_time', full_name='LoginPb.ServerTimeRequest.client_time', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=177, serialized_end=217, ) _SERVERTIMEREPLY = _descriptor.Descriptor( name='ServerTimeReply', full_name='LoginPb.ServerTimeReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='client_time', full_name='LoginPb.ServerTimeReply.client_time', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='server_time', full_name='LoginPb.ServerTimeReply.server_time', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=219, serialized_end=278, ) _LOGINREQUEST = _descriptor.Descriptor( name='LoginRequest', full_name='LoginPb.LoginRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='account', full_name='LoginPb.LoginRequest.account', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=280, serialized_end=311, ) _LOGINREPLY = _descriptor.Descriptor( name='LoginReply', full_name='LoginPb.LoginReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='error', full_name='LoginPb.LoginReply.error', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='token_id', full_name='LoginPb.LoginReply.token_id', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='role_info', full_name='LoginPb.LoginReply.role_info', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rebound_number', full_name='LoginPb.LoginReply.rebound_number', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=313, serialized_end=426, ) _SOMEWHEREELSELOGINPUSH = _descriptor.Descriptor( name='SomeWhereElseLoginPush', full_name='LoginPb.SomeWhereElseLoginPush', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=428, serialized_end=452, ) _ROLEGOLDCHANGEPUSH = _descriptor.Descriptor( name='RoleGoldChangePush', full_name='LoginPb.RoleGoldChangePush', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='gold', full_name='LoginPb.RoleGoldChangePush.gold', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=454, serialized_end=488, ) _ROBOTLOGINREQUEST = _descriptor.Descriptor( name='RobotLoginRequest', full_name='LoginPb.RobotLoginRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='login_time', full_name='LoginPb.RobotLoginRequest.login_time', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='role_id', full_name='LoginPb.RobotLoginRequest.role_id', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sign', full_name='LoginPb.RobotLoginRequest.sign', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='room_static_id', full_name='LoginPb.RobotLoginRequest.room_static_id', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=490, serialized_end=584, ) _APPLOGINREQUEST = _descriptor.Descriptor( name='AppLoginRequest', full_name='LoginPb.AppLoginRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_token', full_name='LoginPb.AppLoginRequest.app_token', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=586, serialized_end=622, ) _BROKENRECONNECTREQUEST = _descriptor.Descriptor( name='BrokenReconnectRequest', full_name='LoginPb.BrokenReconnectRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='role_id', full_name='LoginPb.BrokenReconnectRequest.role_id', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='token_id', full_name='LoginPb.BrokenReconnectRequest.token_id', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=624, serialized_end=683, ) _BROKENRECONNECTREPLY = _descriptor.Descriptor( name='BrokenReconnectReply', full_name='LoginPb.BrokenReconnectReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='error', full_name='LoginPb.BrokenReconnectReply.error', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=685, serialized_end=722, ) _TOKENORNETCUTPUSH = _descriptor.Descriptor( name='TokenOrNetCutPush', full_name='LoginPb.TokenOrNetCutPush', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='error', full_name='LoginPb.TokenOrNetCutPush.error', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=724, serialized_end=758, ) _LOGINREPLY.fields_by_name['role_info'].message_type = _CLIENTROLEINFO DESCRIPTOR.message_types_by_name['ClientRoleInfo'] = _CLIENTROLEINFO DESCRIPTOR.message_types_by_name['HeartBeatRequest'] = _HEARTBEATREQUEST DESCRIPTOR.message_types_by_name['HeartBeatReply'] = _HEARTBEATREPLY DESCRIPTOR.message_types_by_name['ServerTimeRequest'] = _SERVERTIMEREQUEST DESCRIPTOR.message_types_by_name['ServerTimeReply'] = _SERVERTIMEREPLY DESCRIPTOR.message_types_by_name['LoginRequest'] = _LOGINREQUEST DESCRIPTOR.message_types_by_name['LoginReply'] = _LOGINREPLY DESCRIPTOR.message_types_by_name['SomeWhereElseLoginPush'] = _SOMEWHEREELSELOGINPUSH DESCRIPTOR.message_types_by_name['RoleGoldChangePush'] = _ROLEGOLDCHANGEPUSH DESCRIPTOR.message_types_by_name['RobotLoginRequest'] = _ROBOTLOGINREQUEST DESCRIPTOR.message_types_by_name['AppLoginRequest'] = _APPLOGINREQUEST DESCRIPTOR.message_types_by_name['BrokenReconnectRequest'] = _BROKENRECONNECTREQUEST DESCRIPTOR.message_types_by_name['BrokenReconnectReply'] = _BROKENRECONNECTREPLY DESCRIPTOR.message_types_by_name['TokenOrNetCutPush'] = _TOKENORNETCUTPUSH _sym_db.RegisterFileDescriptor(DESCRIPTOR) ClientRoleInfo = _reflection.GeneratedProtocolMessageType('ClientRoleInfo', (_message.Message,), dict( DESCRIPTOR = _CLIENTROLEINFO, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.ClientRoleInfo) )) _sym_db.RegisterMessage(ClientRoleInfo) HeartBeatRequest = _reflection.GeneratedProtocolMessageType('HeartBeatRequest', (_message.Message,), dict( DESCRIPTOR = _HEARTBEATREQUEST, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.HeartBeatRequest) )) _sym_db.RegisterMessage(HeartBeatRequest) HeartBeatReply = _reflection.GeneratedProtocolMessageType('HeartBeatReply', (_message.Message,), dict( DESCRIPTOR = _HEARTBEATREPLY, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.HeartBeatReply) )) _sym_db.RegisterMessage(HeartBeatReply) ServerTimeRequest = _reflection.GeneratedProtocolMessageType('ServerTimeRequest', (_message.Message,), dict( DESCRIPTOR = _SERVERTIMEREQUEST, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.ServerTimeRequest) )) _sym_db.RegisterMessage(ServerTimeRequest) ServerTimeReply = _reflection.GeneratedProtocolMessageType('ServerTimeReply', (_message.Message,), dict( DESCRIPTOR = _SERVERTIMEREPLY, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.ServerTimeReply) )) _sym_db.RegisterMessage(ServerTimeReply) LoginRequest = _reflection.GeneratedProtocolMessageType('LoginRequest', (_message.Message,), dict( DESCRIPTOR = _LOGINREQUEST, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.LoginRequest) )) _sym_db.RegisterMessage(LoginRequest) LoginReply = _reflection.GeneratedProtocolMessageType('LoginReply', (_message.Message,), dict( DESCRIPTOR = _LOGINREPLY, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.LoginReply) )) _sym_db.RegisterMessage(LoginReply) SomeWhereElseLoginPush = _reflection.GeneratedProtocolMessageType('SomeWhereElseLoginPush', (_message.Message,), dict( DESCRIPTOR = _SOMEWHEREELSELOGINPUSH, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.SomeWhereElseLoginPush) )) _sym_db.RegisterMessage(SomeWhereElseLoginPush) RoleGoldChangePush = _reflection.GeneratedProtocolMessageType('RoleGoldChangePush', (_message.Message,), dict( DESCRIPTOR = _ROLEGOLDCHANGEPUSH, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.RoleGoldChangePush) )) _sym_db.RegisterMessage(RoleGoldChangePush) RobotLoginRequest = _reflection.GeneratedProtocolMessageType('RobotLoginRequest', (_message.Message,), dict( DESCRIPTOR = _ROBOTLOGINREQUEST, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.RobotLoginRequest) )) _sym_db.RegisterMessage(RobotLoginRequest) AppLoginRequest = _reflection.GeneratedProtocolMessageType('AppLoginRequest', (_message.Message,), dict( DESCRIPTOR = _APPLOGINREQUEST, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.AppLoginRequest) )) _sym_db.RegisterMessage(AppLoginRequest) BrokenReconnectRequest = _reflection.GeneratedProtocolMessageType('BrokenReconnectRequest', (_message.Message,), dict( DESCRIPTOR = _BROKENRECONNECTREQUEST, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.BrokenReconnectRequest) )) _sym_db.RegisterMessage(BrokenReconnectRequest) BrokenReconnectReply = _reflection.GeneratedProtocolMessageType('BrokenReconnectReply', (_message.Message,), dict( DESCRIPTOR = _BROKENRECONNECTREPLY, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.BrokenReconnectReply) )) _sym_db.RegisterMessage(BrokenReconnectReply) TokenOrNetCutPush = _reflection.GeneratedProtocolMessageType('TokenOrNetCutPush', (_message.Message,), dict( DESCRIPTOR = _TOKENORNETCUTPUSH, __module__ = 'Login_pb2' # @@protoc_insertion_point(class_scope:LoginPb.TokenOrNetCutPush) )) _sym_db.RegisterMessage(TokenOrNetCutPush) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('H\003')) # @@protoc_insertion_point(module_scope)

 

 

 

 

最新回复(0)