proto_http.lua 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. -- http相关协议 31000~31999
  2. local proto_c2s =
  3. [[
  4. #登录
  5. usr_login 1000 {
  6. request {
  7. uid 0: integer
  8. version 1: string # 版本号
  9. password 2: string # 密码
  10. channel 3: integer # 渠道号
  11. apn 4: string # 玩家网络状态
  12. operator 5: string # 运营商类型字段
  13. platform 6: string # 登录平台
  14. appVerison 7: string # 对内版本号
  15. uuid 8: string # UUID
  16. udid 9: string # UDID
  17. sysVer 10: string # 设备信息
  18. }
  19. response {
  20. code 0: integer
  21. sysTime 1: integer # 服务器时间
  22. ip 2: string # Socket连接的IP
  23. port 3: integer # Socket连接的Port
  24. token 4: string # token
  25. http 5: integer # HTTP PORT
  26. registerTime 6: integer # 注册时间
  27. errorMsg 7: string # 登陆失败错误信息
  28. isGuest 8: boolean # 是否游客
  29. wsPort 9: integer # websocket连接端口
  30. uuid 10: string # UUID
  31. configVersion 11: string # configVersion
  32. }
  33. }
  34. #注册
  35. usr_register 1001 {
  36. request {
  37. version 1: string # 版本号
  38. uuid 2: string # UUID
  39. device 3: string # 设备名称
  40. sysVer 4: string # 设备信息
  41. channel 5: integer # 渠道号
  42. apn 6: string # 玩家网络状态
  43. operator 7: string # 运营商类型字段
  44. platform 8: string # 登录平台
  45. udid 9: string # UDID
  46. appVerison 10: string # 对内版本号
  47. deviceId 11: string # 设备号
  48. }
  49. response {
  50. code 0: integer
  51. sysTime 1: integer # 服务器时间
  52. ip 2: string # Socket连接的IP
  53. port 3: integer # Socket连接的Port
  54. token 4: string # token
  55. uid 5: integer #
  56. password 6: string # 密码
  57. http 7: integer # HTTP PORT
  58. registerTime 8: integer # 注册时间
  59. errorMsg 9: string # 登陆失败错误信息
  60. isGuest 10: boolean # 是否游客
  61. wsPort 11: integer # websocket连接端口
  62. uuid 12: string # UUID
  63. configVersion 13: string # configVersion
  64. }
  65. }
  66. ]]
  67. local proto_s2c = [[
  68. ]]
  69. local proto = {
  70. c2s = proto_c2s,
  71. s2c = proto_s2c
  72. }
  73. return proto