protocol

package
v2.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Package protocol implements the Matchmake Referee protocol

Index

Constants

View Source
const (
	// ProtocolID is the protocol ID for the Message Delivery protocol
	ProtocolID = 0x78

	// MethodStartRound is the method ID for the method StartRound
	MethodStartRound = 0x1

	// MethodGetStartRoundParam is the method ID for the method GetStartRoundParam
	MethodGetStartRoundParam = 0x2

	// MethodEndRound is the method ID for the method EndRound
	MethodEndRound = 0x3

	// MethodEndRoundWithoutReport is the method ID for the method EndRoundWithoutReport
	MethodEndRoundWithoutReport = 0x4

	// MethodGetRoundParticipants is the method ID for the method GetRoundParticipants
	MethodGetRoundParticipants = 0x5

	// MethodGetNotSummarizedRound is the method ID for the method GetNotSummarizedRound
	MethodGetNotSummarizedRound = 0x6

	// MethodGetRound is the method ID for the method GetRound
	MethodGetRound = 0x7

	// MethodGetStatsPrimary is the method ID for the method GetStatsPrimary
	MethodGetStatsPrimary = 0x8

	// MethodGetStatsPrimaries is the method ID for the method GetStatsPrimaries
	MethodGetStatsPrimaries = 0x9

	// MethodGetStatsAll is the method ID for the method GetStatsAll
	MethodGetStatsAll = 0xA

	// MethodCreateStats is the method ID for the method CreateStats
	MethodCreateStats = 0xB

	// MethodGetOrCreateStats is the method ID for the method GetOrCreateStats
	MethodGetOrCreateStats = 0xC

	// MethodResetStats is the method ID for the method ResetStats
	MethodResetStats = 0xD
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Endpoint() nex.EndpointInterface
	SetEndpoint(endpoint nex.EndpointInterface)
	SetHandlerStartRound(handler func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStartRoundParam) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetStartRoundParam(handler func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerEndRound(handler func(err error, packet nex.PacketInterface, callID uint32, endRoundParam *matchmake_referee_types.MatchmakeRefereeEndRoundParam) (*nex.RMCMessage, *nex.Error))
	SetHandlerEndRoundWithoutReport(handler func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetRoundParticipants(handler func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetNotSummarizedRound(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetRound(handler func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetStatsPrimary(handler func(err error, packet nex.PacketInterface, callID uint32, target *matchmake_referee_types.MatchmakeRefereeStatsTarget) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetStatsPrimaries(handler func(err error, packet nex.PacketInterface, callID uint32, targets *types.List[*matchmake_referee_types.MatchmakeRefereeStatsTarget]) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetStatsAll(handler func(err error, packet nex.PacketInterface, callID uint32, target *matchmake_referee_types.MatchmakeRefereeStatsTarget) (*nex.RMCMessage, *nex.Error))
	SetHandlerCreateStats(handler func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStatsInitParam) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetOrCreateStats(handler func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStatsInitParam) (*nex.RMCMessage, *nex.Error))
	SetHandlerResetStats(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
}

Interface implements the methods present on the Matchmake Referee protocol struct

type Protocol

type Protocol struct {
	StartRound            func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStartRoundParam) (*nex.RMCMessage, *nex.Error)
	GetStartRoundParam    func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	EndRound              func(err error, packet nex.PacketInterface, callID uint32, endRoundParam *matchmake_referee_types.MatchmakeRefereeEndRoundParam) (*nex.RMCMessage, *nex.Error)
	EndRoundWithoutReport func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	GetRoundParticipants  func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	GetNotSummarizedRound func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)
	GetRound              func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	GetStatsPrimary       func(err error, packet nex.PacketInterface, callID uint32, target *matchmake_referee_types.MatchmakeRefereeStatsTarget) (*nex.RMCMessage, *nex.Error)
	GetStatsPrimaries     func(err error, packet nex.PacketInterface, callID uint32, targets *types.List[*matchmake_referee_types.MatchmakeRefereeStatsTarget]) (*nex.RMCMessage, *nex.Error)
	GetStatsAll           func(err error, packet nex.PacketInterface, callID uint32, target *matchmake_referee_types.MatchmakeRefereeStatsTarget) (*nex.RMCMessage, *nex.Error)
	CreateStats           func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStatsInitParam) (*nex.RMCMessage, *nex.Error)
	GetOrCreateStats      func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStatsInitParam) (*nex.RMCMessage, *nex.Error)
	ResetStats            func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)
	Patches               nex.ServiceProtocol
	PatchedMethods        []uint32
	// contains filtered or unexported fields
}

Protocol stores all the RMC method handlers for the Matchmake Referee protocol and listens for requests

func NewProtocol

func NewProtocol() *Protocol

NewProtocol returns a new Matchmake Referee protocol

func (*Protocol) Endpoint

func (protocol *Protocol) Endpoint() nex.EndpointInterface

Endpoint returns the endpoint implementing the protocol

func (*Protocol) HandlePacket

func (protocol *Protocol) HandlePacket(packet nex.PacketInterface)

HandlePacket sends the packet to the correct RMC method handler

func (*Protocol) SetEndpoint

func (protocol *Protocol) SetEndpoint(endpoint nex.EndpointInterface)

SetEndpoint sets the endpoint implementing the protocol

func (*Protocol) SetHandlerCreateStats

func (protocol *Protocol) SetHandlerCreateStats(handler func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStatsInitParam) (*nex.RMCMessage, *nex.Error))

SetHandlerCreateStats sets the handler for the CreateStats method

func (*Protocol) SetHandlerEndRound

func (protocol *Protocol) SetHandlerEndRound(handler func(err error, packet nex.PacketInterface, callID uint32, endRoundParam *matchmake_referee_types.MatchmakeRefereeEndRoundParam) (*nex.RMCMessage, *nex.Error))

SetHandlerEndRound sets the handler for the EndRound method

func (*Protocol) SetHandlerEndRoundWithoutReport

func (protocol *Protocol) SetHandlerEndRoundWithoutReport(handler func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerEndRoundWithoutReport sets the handler for the EndRoundWithoutReport method

func (*Protocol) SetHandlerGetNotSummarizedRound

func (protocol *Protocol) SetHandlerGetNotSummarizedRound(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))

SetHandlerGetNotSummarizedRound sets the handler for the GetNotSummarizedRound method

func (*Protocol) SetHandlerGetOrCreateStats

func (protocol *Protocol) SetHandlerGetOrCreateStats(handler func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStatsInitParam) (*nex.RMCMessage, *nex.Error))

SetHandlerGetOrCreateStats sets the handler for the GetOrCreateStats method

func (*Protocol) SetHandlerGetRound

func (protocol *Protocol) SetHandlerGetRound(handler func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerGetRound sets the handler for the GetRound method

func (*Protocol) SetHandlerGetRoundParticipants

func (protocol *Protocol) SetHandlerGetRoundParticipants(handler func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerGetRoundParticipants sets the handler for the GetRoundParticipants method

func (*Protocol) SetHandlerGetStartRoundParam

func (protocol *Protocol) SetHandlerGetStartRoundParam(handler func(err error, packet nex.PacketInterface, callID uint32, roundID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerGetStartRoundParam sets the handler for the GetStartRoundParam method

func (*Protocol) SetHandlerGetStatsAll

func (protocol *Protocol) SetHandlerGetStatsAll(handler func(err error, packet nex.PacketInterface, callID uint32, target *matchmake_referee_types.MatchmakeRefereeStatsTarget) (*nex.RMCMessage, *nex.Error))

SetHandlerGetStatsAll sets the handler for the GetStatsAll method

func (*Protocol) SetHandlerGetStatsPrimaries

func (protocol *Protocol) SetHandlerGetStatsPrimaries(handler func(err error, packet nex.PacketInterface, callID uint32, targets *types.List[*matchmake_referee_types.MatchmakeRefereeStatsTarget]) (*nex.RMCMessage, *nex.Error))

SetHandlerGetStatsPrimaries sets the handler for the GetStatsPrimaries method

func (*Protocol) SetHandlerGetStatsPrimary

func (protocol *Protocol) SetHandlerGetStatsPrimary(handler func(err error, packet nex.PacketInterface, callID uint32, target *matchmake_referee_types.MatchmakeRefereeStatsTarget) (*nex.RMCMessage, *nex.Error))

SetHandlerGetStatsPrimary sets the handler for the GetStatsPrimary method

func (*Protocol) SetHandlerResetStats

func (protocol *Protocol) SetHandlerResetStats(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))

SetHandlerResetStats sets the handler for the ResetStats method

func (*Protocol) SetHandlerStartRound

func (protocol *Protocol) SetHandlerStartRound(handler func(err error, packet nex.PacketInterface, callID uint32, param *matchmake_referee_types.MatchmakeRefereeStartRoundParam) (*nex.RMCMessage, *nex.Error))

SetHandlerStartRound sets the handler for the StartRound method

Directories

Path Synopsis
Package types implements all the types used by the MatchmakeReferee protocol
Package types implements all the types used by the MatchmakeReferee protocol

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL