framesync.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package msg
  2. import (
  3. "encoding/json"
  4. "leafstalk/covenant/model"
  5. )
  6. // Entry 登录
  7. type ChapterSyncEntry struct {
  8. PlayerId int64 `json:"userId"`
  9. Token string `json:"token"`
  10. LineId int `json:"serverId"`
  11. SyncRoomId int64 `json:"matchRoomId,string"`
  12. ReLogin int32 `json:"reLogin"` // 重连1
  13. }
  14. type ResponseChapterSyncEntry struct {
  15. ErrCode int `json:"errCode"`
  16. Msg string `json:"msg,omitempty"`
  17. Data int `json:"data"`
  18. }
  19. // Entry 重连
  20. type ChapterSyncReLogin struct {
  21. PlayerId int64 `json:"userId"`
  22. }
  23. // Entry 重连
  24. type ChapterSynToken struct {
  25. PlayerId int64 `json:"userId"`
  26. }
  27. type JoinerAttr struct {
  28. PlayerId int64 `json:"userId"`
  29. }
  30. // 创建帧同步房间
  31. type CreateFrameSyncGroupIs struct {
  32. RpcRequestMsg
  33. *model.EnterRoomData
  34. }
  35. type ResponseCreateFrameSyncGroupIs struct {
  36. RpcResponseMsg
  37. SyncRoomId int64 `json:"syncRoomId,string"`
  38. GameSyncAddr string `json:"gameSyncAddr"`
  39. }
  40. type FrameSyncToServer struct {
  41. PlayerId int64 `json:"userId"`
  42. SyncGroupId int64 `json:"syncGroupId,string"`
  43. FrameId int64 `json:"frameId"`
  44. RawData json.RawMessage `json:"raw,omitempty"`
  45. }
  46. type ReLoginEnterRoom struct {
  47. PlayerId int64 `json:"userId"`
  48. SyncRoomId int64 `json:"matchRoomId,string"`
  49. }
  50. type ResponseReLoginEnterRoom struct {
  51. ErrCode int `json:"errCode"`
  52. Msg string `json:"msg,omitempty"`
  53. Data *model.EnterRoomData `json:"data"`
  54. }