123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- -- http相关协议 31000~31999
- local proto_c2s =
- [[
- #登录
- usr_login 1000 {
- request {
- uid 0: integer
- version 1: string # 版本号
- password 2: string # 密码
- channel 3: integer # 渠道号
- apn 4: string # 玩家网络状态
- operator 5: string # 运营商类型字段
- platform 6: string # 登录平台
- appVerison 7: string # 对内版本号
- uuid 8: string # UUID
- udid 9: string # UDID
- sysVer 10: string # 设备信息
- }
- response {
- code 0: integer
- sysTime 1: integer # 服务器时间
- ip 2: string # Socket连接的IP
- port 3: integer # Socket连接的Port
- token 4: string # token
- http 5: integer # HTTP PORT
- registerTime 6: integer # 注册时间
- errorMsg 7: string # 登陆失败错误信息
- isGuest 8: boolean # 是否游客
- wsPort 9: integer # websocket连接端口
- uuid 10: string # UUID
- configVersion 11: string # configVersion
- }
- }
- #注册
- usr_register 1001 {
- request {
- version 1: string # 版本号
- uuid 2: string # UUID
- device 3: string # 设备名称
- sysVer 4: string # 设备信息
- channel 5: integer # 渠道号
- apn 6: string # 玩家网络状态
- operator 7: string # 运营商类型字段
- platform 8: string # 登录平台
- udid 9: string # UDID
- appVerison 10: string # 对内版本号
- deviceId 11: string # 设备号
- }
- response {
- code 0: integer
- sysTime 1: integer # 服务器时间
- ip 2: string # Socket连接的IP
- port 3: integer # Socket连接的Port
- token 4: string # token
- uid 5: integer #
- password 6: string # 密码
- http 7: integer # HTTP PORT
- registerTime 8: integer # 注册时间
- errorMsg 9: string # 登陆失败错误信息
- isGuest 10: boolean # 是否游客
- wsPort 11: integer # websocket连接端口
- uuid 12: string # UUID
- configVersion 13: string # configVersion
- }
- }
- # 注册 - 手机号
- usr_register_by_phone 1002 {
- request {
- version 1: string # 必填 - 版本号
- channel 2: integer # 必填 - 渠道号
- device 3: string # 选填 - 设备名称
- sysVer 4: string # 选填 - 设备信息
- apn 5: string # 选填 - 玩家网络状态
- operator 6: string # 选填 - 运营商类型字段
- platform 7: string # 选填 - 登录平台
- deviceId 8: string # 选填 - 设备号
- phone 30: string # 必填 - 手机号
- vcode 31: string # 必填 - 验证码
- password 32: string # 必填 - 密码
- nickname 33: string # 选填 - 昵称 - 空:手机号作为昵称
- sharecode 34: string # 选填 - 邀请码
- }
- response {
- code 0: integer
- sysTime 1: integer # 服务器时间
- ip 2: string # 游戏服网关地址
- port 3: integer # 网关Socket连接的Port
- wsPort 4: integer # 网关websocket连接端口
- httpPort 5: integer # 网关HTTP PORT
- token 6: string # token
- uid 7: integer # 玩家id
- registerTime 8: integer # 注册时间
- errorMsg 9: string # 登陆失败错误信息
- configVersion 10: string # configVersion
- }
- }
-
- # 登录 - 手机号
- usr_login_by_phone 1003 {
- request {
- version 1: string # 必填 - 版本号
- channel 2: integer # 必填 - 渠道号
- device 3: string # 选填 - 设备名称
- sysVer 4: string # 选填 - 设备信息
- apn 5: string # 选填 - 玩家网络状态
- operator 6: string # 选填 - 运营商类型字段
- platform 7: string # 选填 - 登录平台
- deviceId 8: string # 选填 - 设备号
- phone 30: string # 必填 - 手机号
- vcode 31: string # vcode/password必填 - 验证码 - 优先校验vcode
- password 32: string # vcode/password必填 - 密码
- }
- response {
- code 0: integer
- sysTime 1: integer # 服务器时间
- ip 2: string # 游戏服网关地址
- port 3: integer # 网关Socket连接的Port
- wsPort 4: integer # 网关websocket连接端口
- httpPort 5: integer # 网关HTTP PORT
- token 6: string # token
- uid 7: integer # 玩家id
- registerTime 8: integer # 注册时间
- errorMsg 9: string # 登陆失败错误信息
- configVersion 10: string # configVersion
- }
- }
- ]]
- local proto_s2c = [[
- ]]
- local proto = {
- c2s = proto_c2s,
- s2c = proto_s2c
- }
- return proto
|