protocol

package
v2.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Package protocol implements the Ranking2 protocol

Index

Constants

View Source
const (
	// ProtocolID is the protocol ID for the Ranking2 protocol
	ProtocolID = 0x7A

	// MethodPutScore is the method ID for the method PutScore
	MethodPutScore = 0x1

	// MethodGetCommonData is the method ID for the method GetCommonData
	MethodGetCommonData = 0x2

	// MethodPutCommonData is the method ID for the method PutCommonData
	MethodPutCommonData = 0x3

	// MethodDeleteCommonData is the method ID for the method DeleteCommonData
	MethodDeleteCommonData = 0x4

	// MethodGetRanking is the method ID for the method GetRanking
	MethodGetRanking = 0x5

	// MethodGetRankingByPrincipalID is the method ID for the method GetRankingByPrincipalID
	MethodGetRankingByPrincipalID = 0x6

	// MethodGetCategorySetting is the method ID for the method GetCategorySetting
	MethodGetCategorySetting = 0x7

	// MethodGetRankingChart is the method ID for the method GetRankingChart
	MethodGetRankingChart = 0x8

	// MethodGetRankingCharts is the method ID for the method GetRankingCharts
	MethodGetRankingCharts = 0x9

	// MethodGetEstimateScoreRank is the method ID for the method GetEstimateScoreRank
	MethodGetEstimateScoreRank = 0xA
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Endpoint() nex.EndpointInterface
	SetEndpoint(endpoint nex.EndpointInterface)
	SetHandlerPutScore(handler func(err error, packet nex.PacketInterface, callID uint32, scoreDataList *types.List[*ranking2_types.Ranking2ScoreData], nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, optionFlags *types.PrimitiveU32, principalID *types.PID, nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerPutCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, commonData *ranking2_types.Ranking2CommonData, nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerDeleteCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetRanking(handler func(err error, packet nex.PacketInterface, callID uint32, getParam *ranking2_types.Ranking2GetParam) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetRankingByPrincipalID(handler func(err error, packet nex.PacketInterface, callID uint32, getParam *ranking2_types.Ranking2GetParam, principalIDList *types.List[*types.PID]) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetCategorySetting(handler func(err error, packet nex.PacketInterface, callID uint32, category *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetRankingChart(handler func(err error, packet nex.PacketInterface, callID uint32, info *ranking2_types.Ranking2ChartInfoInput) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetRankingCharts(handler func(err error, packet nex.PacketInterface, callID uint32, infoArray *types.List[*ranking2_types.Ranking2ChartInfoInput]) (*nex.RMCMessage, *nex.Error))
	SetHandlerGetEstimateScoreRank(handler func(err error, packet nex.PacketInterface, callID uint32, input *ranking2_types.Ranking2EstimateScoreRankInput) (*nex.RMCMessage, *nex.Error))
}

Interface implements the methods present on the Ranking2 protocol struct

type Protocol

type Protocol struct {
	PutScore                func(err error, packet nex.PacketInterface, callID uint32, scoreDataList *types.List[*ranking2_types.Ranking2ScoreData], nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	GetCommonData           func(err error, packet nex.PacketInterface, callID uint32, optionFlags *types.PrimitiveU32, principalID *types.PID, nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	PutCommonData           func(err error, packet nex.PacketInterface, callID uint32, commonData *ranking2_types.Ranking2CommonData, nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	DeleteCommonData        func(err error, packet nex.PacketInterface, callID uint32, nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error)
	GetRanking              func(err error, packet nex.PacketInterface, callID uint32, getParam *ranking2_types.Ranking2GetParam) (*nex.RMCMessage, *nex.Error)
	GetRankingByPrincipalID func(err error, packet nex.PacketInterface, callID uint32, getParam *ranking2_types.Ranking2GetParam, principalIDList *types.List[*types.PID]) (*nex.RMCMessage, *nex.Error)
	GetCategorySetting      func(err error, packet nex.PacketInterface, callID uint32, category *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error)
	GetRankingChart         func(err error, packet nex.PacketInterface, callID uint32, info *ranking2_types.Ranking2ChartInfoInput) (*nex.RMCMessage, *nex.Error)
	GetRankingCharts        func(err error, packet nex.PacketInterface, callID uint32, infoArray *types.List[*ranking2_types.Ranking2ChartInfoInput]) (*nex.RMCMessage, *nex.Error)
	GetEstimateScoreRank    func(err error, packet nex.PacketInterface, callID uint32, input *ranking2_types.Ranking2EstimateScoreRankInput) (*nex.RMCMessage, *nex.Error)
	Patches                 nex.ServiceProtocol
	PatchedMethods          []uint32
	// contains filtered or unexported fields
}

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

func NewProtocol

func NewProtocol() *Protocol

NewProtocol returns a new Ranking2 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) SetHandlerDeleteCommonData

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

SetHandlerDeleteCommonData sets the handler for the DeleteCommonData method

func (*Protocol) SetHandlerGetCategorySetting

func (protocol *Protocol) SetHandlerGetCategorySetting(handler func(err error, packet nex.PacketInterface, callID uint32, category *types.PrimitiveU32) (*nex.RMCMessage, *nex.Error))

SetHandlerGetCategorySetting sets the handler for the GetCategorySetting method

func (*Protocol) SetHandlerGetCommonData

func (protocol *Protocol) SetHandlerGetCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, optionFlags *types.PrimitiveU32, principalID *types.PID, nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerGetCommonData sets the handler for the GetCommonData method

func (*Protocol) SetHandlerGetEstimateScoreRank

func (protocol *Protocol) SetHandlerGetEstimateScoreRank(handler func(err error, packet nex.PacketInterface, callID uint32, input *ranking2_types.Ranking2EstimateScoreRankInput) (*nex.RMCMessage, *nex.Error))

SetHandlerGetEstimateScoreRank sets the handler for the GetEstimateScoreRank method

func (*Protocol) SetHandlerGetRanking

func (protocol *Protocol) SetHandlerGetRanking(handler func(err error, packet nex.PacketInterface, callID uint32, getParam *ranking2_types.Ranking2GetParam) (*nex.RMCMessage, *nex.Error))

SetHandlerGetRanking sets the handler for the GetRanking method

func (*Protocol) SetHandlerGetRankingByPrincipalID

func (protocol *Protocol) SetHandlerGetRankingByPrincipalID(handler func(err error, packet nex.PacketInterface, callID uint32, getParam *ranking2_types.Ranking2GetParam, principalIDList *types.List[*types.PID]) (*nex.RMCMessage, *nex.Error))

SetHandlerGetRankingByPrincipalID sets the handler for the GetRankingByPrincipalID method

func (*Protocol) SetHandlerGetRankingChart

func (protocol *Protocol) SetHandlerGetRankingChart(handler func(err error, packet nex.PacketInterface, callID uint32, info *ranking2_types.Ranking2ChartInfoInput) (*nex.RMCMessage, *nex.Error))

SetHandlerGetRankingChart sets the handler for the GetRankingChart method

func (*Protocol) SetHandlerGetRankingCharts

func (protocol *Protocol) SetHandlerGetRankingCharts(handler func(err error, packet nex.PacketInterface, callID uint32, infoArray *types.List[*ranking2_types.Ranking2ChartInfoInput]) (*nex.RMCMessage, *nex.Error))

SetHandlerGetRankingCharts sets the handler for the GetRankingCharts method

func (*Protocol) SetHandlerPutCommonData

func (protocol *Protocol) SetHandlerPutCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, commonData *ranking2_types.Ranking2CommonData, nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerPutCommonData sets the handler for the PutCommonData method

func (*Protocol) SetHandlerPutScore

func (protocol *Protocol) SetHandlerPutScore(handler func(err error, packet nex.PacketInterface, callID uint32, scoreDataList *types.List[*ranking2_types.Ranking2ScoreData], nexUniqueID *types.PrimitiveU64) (*nex.RMCMessage, *nex.Error))

SetHandlerPutScore sets the handler for the PutScore method

Directories

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

Jump to

Keyboard shortcuts

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