package matching
import "github.com/Diarkis/diarkis/proto/go/matching"
Index
- Constants
-
type ClaimMatchmaking
- func NewClaimMatchmaking() *ClaimMatchmaking
- func (proto *ClaimMatchmaking) GetCmd() uint16
- func (proto *ClaimMatchmaking) GetVer() uint8
- func (proto *ClaimMatchmaking) Pack() []byte
- func (proto *ClaimMatchmaking) PackedSize() int
- func (proto *ClaimMatchmaking) String() string
- func (proto *ClaimMatchmaking) Unpack(bytes []byte) error
-
type ClearMatchmaking
- func NewClearMatchmaking() *ClearMatchmaking
- func (proto *ClearMatchmaking) GetCmd() uint16
- func (proto *ClearMatchmaking) GetVer() uint8
- func (proto *ClearMatchmaking) Pack() []byte
- func (proto *ClearMatchmaking) PackedSize() int
- func (proto *ClearMatchmaking) String() string
- func (proto *ClearMatchmaking) Unpack(bytes []byte) error
-
type HostMatchmaking
- func NewHostMatchmaking() *HostMatchmaking
- func (proto *HostMatchmaking) GetCmd() uint16
- func (proto *HostMatchmaking) GetVer() uint8
- func (proto *HostMatchmaking) Pack() []byte
- func (proto *HostMatchmaking) PackedSize() int
- func (proto *HostMatchmaking) String() string
- func (proto *HostMatchmaking) Unpack(bytes []byte) error
-
type KickFromMatchmaking
- func NewKickFromMatchmaking() *KickFromMatchmaking
- func (proto *KickFromMatchmaking) GetCmd() uint16
- func (proto *KickFromMatchmaking) GetVer() uint8
- func (proto *KickFromMatchmaking) Pack() []byte
- func (proto *KickFromMatchmaking) PackedSize() int
- func (proto *KickFromMatchmaking) String() string
- func (proto *KickFromMatchmaking) Unpack(bytes []byte) error
- type MmRoomProps
-
type SyncMatchmakingMembers
- func NewSyncMatchmakingMembers() *SyncMatchmakingMembers
- func (proto *SyncMatchmakingMembers) GetCmd() uint16
- func (proto *SyncMatchmakingMembers) GetVer() uint8
- func (proto *SyncMatchmakingMembers) Pack() []byte
- func (proto *SyncMatchmakingMembers) PackedSize() int
- func (proto *SyncMatchmakingMembers) String() string
- func (proto *SyncMatchmakingMembers) Unpack(bytes []byte) error
Constants
const ClaimMatchmakingCmd uint16 = 205
ClaimMatchmakingCmd represents the command ID of the protocol's command ID.
[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const ClaimMatchmakingVer uint8 = 1
ClaimMatchmakingVer represents the ver of the protocol's command.
[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const ClearMatchmakingCmd uint16 = 202
ClearMatchmakingCmd represents the command ID of the protocol's command ID.
[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const ClearMatchmakingVer uint8 = 1
ClearMatchmakingVer represents the ver of the protocol's command.
[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const HostMatchmakingCmd uint16 = 200
HostMatchmakingCmd represents the command ID of the protocol's command ID.
[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const HostMatchmakingVer uint8 = 1
HostMatchmakingVer represents the ver of the protocol's command.
[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const KickFromMatchmakingCmd uint16 = 217
KickFromMatchmakingCmd represents the command ID of the protocol's command ID.
[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const KickFromMatchmakingVer uint8 = 1
KickFromMatchmakingVer represents the ver of the protocol's command.
[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const MmRoomPropsCmd uint16 = 0
MmRoomPropsCmd represents the command ID of the protocol's command ID.
[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const MmRoomPropsVer uint8 = 0
MmRoomPropsVer represents the ver of the protocol's command.
[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
const SyncMatchmakingMembersCmd uint16 = 204
SyncMatchmakingMembersCmd represents the command ID of the protocol's command ID.
[NOTE] The value is optional and if cmd is not given in the definition JSON, it will be 0.
const SyncMatchmakingMembersVer uint8 = 1
SyncMatchmakingMembersVer represents the ver of the protocol's command.
[NOTE] The value is optional and if ver is not given in the definition JSON, it will be 0.
Types
type ClaimMatchmaking
type ClaimMatchmaking struct { // Command version of the protocol Ver uint8 // Command ID of the protocol Cmd uint16 // Message broadcast on matchmaking room join. Message []byte // Room ID of the matchmaking room to commit to. RoomID string }
ClaimMatchmaking represents the command protocol data structure.
func NewClaimMatchmaking
func NewClaimMatchmaking() *ClaimMatchmaking
NewClaimMatchmaking creates a new instance of ClaimMatchmaking struct.
func (*ClaimMatchmaking) GetCmd
func (proto *ClaimMatchmaking) GetCmd() uint16
func (*ClaimMatchmaking) GetVer
func (proto *ClaimMatchmaking) GetVer() uint8
func (*ClaimMatchmaking) Pack
func (proto *ClaimMatchmaking) Pack() []byte
Pack encodes ClaimMatchmaking struct to a byte array to be delivered over the command.
func (*ClaimMatchmaking) PackedSize
func (proto *ClaimMatchmaking) PackedSize() int
PackedSize returns the estimated packed size of the struct.
func (*ClaimMatchmaking) String
func (proto *ClaimMatchmaking) String() string
func (*ClaimMatchmaking) Unpack
func (proto *ClaimMatchmaking) Unpack(bytes []byte) error
Unpack decodes the command payload byte array to ClaimMatchmaking struct.
type ClearMatchmaking
type ClearMatchmaking struct { // Command version of the protocol Ver uint8 // Command ID of the protocol Cmd uint16 // If true, the room will only be removed from matchmaking without deleting it. HaltFlag bool // Message announced on matchmaking room deletion. Message []byte // The profile ID for which the host's matchmaking room is searchable by, and for which to remove. ProfileID string // Unique ID list of searchable items for which to remove. UniqueIDs []string }
ClearMatchmaking represents the command protocol data structure.
func NewClearMatchmaking
func NewClearMatchmaking() *ClearMatchmaking
NewClearMatchmaking creates a new instance of ClearMatchmaking struct.
func (*ClearMatchmaking) GetCmd
func (proto *ClearMatchmaking) GetCmd() uint16
func (*ClearMatchmaking) GetVer
func (proto *ClearMatchmaking) GetVer() uint8
func (*ClearMatchmaking) Pack
func (proto *ClearMatchmaking) Pack() []byte
Pack encodes ClearMatchmaking struct to a byte array to be delivered over the command.
func (*ClearMatchmaking) PackedSize
func (proto *ClearMatchmaking) PackedSize() int
PackedSize returns the estimated packed size of the struct.
func (*ClearMatchmaking) String
func (proto *ClearMatchmaking) String() string
func (*ClearMatchmaking) Unpack
func (proto *ClearMatchmaking) Unpack(bytes []byte) error
Unpack decodes the command payload byte array to ClearMatchmaking struct.
type HostMatchmaking
type HostMatchmaking struct { // Command version of the protocol Ver uint8 // Command ID of the protocol Cmd uint16 // Maximum number of members allowed to join the matchmaking room. MaxMembers uint16 // Serialized metadata associated with the matchmaking room. Metadata []byte // The profile ID for which to make the host's matchmaking room searchable by. ProfileID string // Properties of map(k string, v int) associated with the matchmaking room. Props []*MmRoomProps // If true, the room will only be reserved for the host and not automatically joined (allowEmpty=true). ReserveOnly bool // TTL of the room when it is empty in seconds. The value must be greater than 0. Minimum is 10 seconds. TTL uint8 // The tag for which to make the host's matchmaking room searchable by. Tag string }
HostMatchmaking represents the command protocol data structure.
func NewHostMatchmaking
func NewHostMatchmaking() *HostMatchmaking
NewHostMatchmaking creates a new instance of HostMatchmaking struct.
func (*HostMatchmaking) GetCmd
func (proto *HostMatchmaking) GetCmd() uint16
func (*HostMatchmaking) GetVer
func (proto *HostMatchmaking) GetVer() uint8
func (*HostMatchmaking) Pack
func (proto *HostMatchmaking) Pack() []byte
Pack encodes HostMatchmaking struct to a byte array to be delivered over the command.
func (*HostMatchmaking) PackedSize
func (proto *HostMatchmaking) PackedSize() int
PackedSize returns the estimated packed size of the struct.
func (*HostMatchmaking) String
func (proto *HostMatchmaking) String() string
func (*HostMatchmaking) Unpack
func (proto *HostMatchmaking) Unpack(bytes []byte) error
Unpack decodes the command payload byte array to HostMatchmaking struct.
type KickFromMatchmaking
type KickFromMatchmaking struct { // Command version of the protocol Ver uint8 // Command ID of the protocol Cmd uint16 // Message announced to matchmaking room via kicked user on kick. Message []byte // User ID of the target user to kick from the matchmaking room. TargetUID string }
KickFromMatchmaking represents the command protocol data structure.
func NewKickFromMatchmaking
func NewKickFromMatchmaking() *KickFromMatchmaking
NewKickFromMatchmaking creates a new instance of KickFromMatchmaking struct.
func (*KickFromMatchmaking) GetCmd
func (proto *KickFromMatchmaking) GetCmd() uint16
func (*KickFromMatchmaking) GetVer
func (proto *KickFromMatchmaking) GetVer() uint8
func (*KickFromMatchmaking) Pack
func (proto *KickFromMatchmaking) Pack() []byte
Pack encodes KickFromMatchmaking struct to a byte array to be delivered over the command.
func (*KickFromMatchmaking) PackedSize
func (proto *KickFromMatchmaking) PackedSize() int
PackedSize returns the estimated packed size of the struct.
func (*KickFromMatchmaking) String
func (proto *KickFromMatchmaking) String() string
func (*KickFromMatchmaking) Unpack
func (proto *KickFromMatchmaking) Unpack(bytes []byte) error
Unpack decodes the command payload byte array to KickFromMatchmaking struct.
type MmRoomProps
type MmRoomProps struct { // Command version of the protocol Ver uint8 // Command ID of the protocol Cmd uint16 // Key of the matchmaking room property map[string]int Key string // Value of matchmaking room property map[string]int Value int64 }
MmRoomProps represents the command protocol data structure.
func NewMmRoomProps
func NewMmRoomProps() *MmRoomProps
NewMmRoomProps creates a new instance of MmRoomProps struct.
func (*MmRoomProps) GetCmd
func (proto *MmRoomProps) GetCmd() uint16
func (*MmRoomProps) GetVer
func (proto *MmRoomProps) GetVer() uint8
func (*MmRoomProps) Pack
func (proto *MmRoomProps) Pack() []byte
Pack encodes MmRoomProps struct to a byte array to be delivered over the command.
func (*MmRoomProps) PackedSize
func (proto *MmRoomProps) PackedSize() int
PackedSize returns the estimated packed size of the struct.
func (*MmRoomProps) String
func (proto *MmRoomProps) String() string
func (*MmRoomProps) Unpack
func (proto *MmRoomProps) Unpack(bytes []byte) error
Unpack decodes the command payload byte array to MmRoomProps struct.
type SyncMatchmakingMembers
type SyncMatchmakingMembers struct { // Command version of the protocol Ver uint8 // Command ID of the protocol Cmd uint16 // Message announced to matchmaking room upon sync. Message []byte }
SyncMatchmakingMembers represents the command protocol data structure.
func NewSyncMatchmakingMembers
func NewSyncMatchmakingMembers() *SyncMatchmakingMembers
NewSyncMatchmakingMembers creates a new instance of SyncMatchmakingMembers struct.
func (*SyncMatchmakingMembers) GetCmd
func (proto *SyncMatchmakingMembers) GetCmd() uint16
func (*SyncMatchmakingMembers) GetVer
func (proto *SyncMatchmakingMembers) GetVer() uint8
func (*SyncMatchmakingMembers) Pack
func (proto *SyncMatchmakingMembers) Pack() []byte
Pack encodes SyncMatchmakingMembers struct to a byte array to be delivered over the command.
func (*SyncMatchmakingMembers) PackedSize
func (proto *SyncMatchmakingMembers) PackedSize() int
PackedSize returns the estimated packed size of the struct.
func (*SyncMatchmakingMembers) String
func (proto *SyncMatchmakingMembers) String() string
func (*SyncMatchmakingMembers) Unpack
func (proto *SyncMatchmakingMembers) Unpack(bytes []byte) error
Unpack decodes the command payload byte array to SyncMatchmakingMembers struct.