framesync.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package msg
  2. import "encoding/json"
  3. // Entry 登录
  4. type ChapterSyncEntry struct {
  5. PlayerId int64 `json:"userId"`
  6. Token string `json:"token"`
  7. LineId int `json:"serverId"`
  8. SyncRoomId int64 `json:"matchRoomId,string"`
  9. ReLogin int32 `json:"reLogin"` // 重连1
  10. }
  11. type ResponseChapterSyncEntry struct {
  12. ErrCode int `json:"errCode"`
  13. Msg string `json:"msg,omitempty"`
  14. Data int `json:"data"`
  15. }
  16. // Entry 重连
  17. type ChapterSyncReLogin struct {
  18. PlayerId int64 `json:"userId"`
  19. }
  20. // Entry 重连
  21. type ChapterSynToken struct {
  22. PlayerId int64 `json:"userId"`
  23. }
  24. type JoinerAttr struct {
  25. PlayerId int64 `json:"userId"`
  26. }
  27. // 创建帧同步房间
  28. type CreateFrameSyncGroupIs struct {
  29. RpcRequestMsg
  30. SyncGroupId int64 `json:"SyncGroupId,string"`
  31. Token string `json:"token"`
  32. Joiners []*JoinerAttr `json:"joiners"`
  33. }
  34. type ResponseCreateChapterSyncRoomIs struct {
  35. RpcResponseMsg
  36. }
  37. type FrameSyncToServer struct {
  38. PlayerId int64 `json:"userId"`
  39. SyncGroupId int64 `json:"syncGroupId,string"`
  40. FrameId int64 `json:"frameId"`
  41. RawData json.RawMessage `json:"raw,omitempty"`
  42. }