Documentation
¶
Overview ¶
Package protocol implements the Rating protocol
Package protocol implements the Rating protocol ¶
Package protocol implements the Rating protocol ¶
Package protocol implements the Rating protocol ¶
Package protocol implements the Rating protocol ¶
Package protocol implements the Rating protocol ¶
Package protocol implements the Rating protocol ¶
Package protocol implements the Rating protocol
Index ¶
- Constants
- type Interface
- type Protocol
- func (protocol *Protocol) Endpoint() nex.EndpointInterface
- func (protocol *Protocol) HandlePacket(packet nex.PacketInterface)
- func (protocol *Protocol) SetEndpoint(endpoint nex.EndpointInterface)
- func (protocol *Protocol) SetHandlerDeleteScore(...)
- func (protocol *Protocol) SetHandlerGetCommonData(...)
- func (protocol *Protocol) SetHandlerGetRanking(...)
- func (protocol *Protocol) SetHandlerReportRatingStats(...)
- func (protocol *Protocol) SetHandlerUnk1(...)
- func (protocol *Protocol) SetHandlerUnk2(...)
- func (protocol *Protocol) SetHandlerUploadCommonData(...)
Constants ¶
const ( // ProtocolID is the protocol ID for the Rating protocol ProtocolID = 0x76 // MethodUnk1 is the method ID for the method Unk1 // TODO - Find name if possible MethodUnk1 = 0x1 // MethodUnk2 is the method ID for the method Unk2 // TODO - Find name if possible MethodUnk2 = 0x2 // MethodReportRatingStats is the method ID for the method ReportRatingStats MethodReportRatingStats = 0x3 // MethodGetRanking is the method ID for the method GetRanking MethodGetRanking = 0x4 // MethodDeleteScore is the method ID for the method DeleteScore MethodDeleteScore = 0x5 // MethodUploadCommonData is the method ID for the method UploadCommonData MethodUploadCommonData = 0x7 // MethodGetCommonData is the method ID for the method GetCommonData MethodGetCommonData = 0x8 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
Endpoint() nex.EndpointInterface
SetEndpoint(endpoint nex.EndpointInterface)
SetHandlerUnk1(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) // TODO - Find name if possible
SetHandlerUnk2(handler func(err error, packet nex.PacketInterface, callID uint32, sessionToken rating_types.RatingSessionToken) (*nex.RMCMessage, *nex.Error)) // TODO - Find name if possible
SetHandlerReportRatingStats(handler func(err error, packet nex.PacketInterface, callID uint32, sessionToken rating_types.RatingSessionToken, stats types.List[rating_types.RatingStats]) (*nex.RMCMessage, *nex.Error))
SetHandlerGetRanking(handler func(err error, packet nex.PacketInterface, callID uint32, category types.UInt32, uniqueID types.UInt64, principalID types.PID) (*nex.RMCMessage, *nex.Error))
SetHandlerDeleteScore(handler func(err error, packet nex.PacketInterface, callID uint32, category types.UInt32, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error))
SetHandlerUploadCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, commonData types.Buffer, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error))
SetHandlerGetCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error))
}
Interface implements the methods present on the Rating protocol struct
type Protocol ¶
type Protocol struct {
Unk1 func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) // TODO - Find name if possible
Unk2 func(err error, packet nex.PacketInterface, callID uint32, sessionToken rating_types.RatingSessionToken) (*nex.RMCMessage, *nex.Error) // TODO - Find name if possible
ReportRatingStats func(err error, packet nex.PacketInterface, callID uint32, sessionToken rating_types.RatingSessionToken, stats types.List[rating_types.RatingStats]) (*nex.RMCMessage, *nex.Error)
GetRanking func(err error, packet nex.PacketInterface, callID uint32, category types.UInt32, uniqueID types.UInt64, principalID types.PID) (*nex.RMCMessage, *nex.Error)
DeleteScore func(err error, packet nex.PacketInterface, callID uint32, category types.UInt32, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error)
UploadCommonData func(err error, packet nex.PacketInterface, callID uint32, commonData types.Buffer, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error)
GetCommonData func(err error, packet nex.PacketInterface, callID uint32, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error)
Patches nex.ServiceProtocol
PatchedMethods []uint32
// contains filtered or unexported fields
}
Protocol handles the Rating 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) SetHandlerDeleteScore ¶ added in v2.2.2
func (protocol *Protocol) SetHandlerDeleteScore(handler func(err error, packet nex.PacketInterface, callID uint32, category types.UInt32, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error))
SetHandlerDeleteScore sets the handler for the DeleteScore method
func (*Protocol) SetHandlerGetCommonData ¶ added in v2.2.2
func (protocol *Protocol) SetHandlerGetCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error))
SetHandlerGetCommonData sets the handler for the GetCommonData method
func (*Protocol) SetHandlerGetRanking ¶ added in v2.2.2
func (protocol *Protocol) SetHandlerGetRanking(handler func(err error, packet nex.PacketInterface, callID uint32, category types.UInt32, uniqueID types.UInt64, principalID types.PID) (*nex.RMCMessage, *nex.Error))
SetHandlerGetRanking sets the handler for the GetRanking method
func (*Protocol) SetHandlerReportRatingStats ¶ added in v2.2.2
func (protocol *Protocol) SetHandlerReportRatingStats(handler func(err error, packet nex.PacketInterface, callID uint32, sessionToken rating_types.RatingSessionToken, stats types.List[rating_types.RatingStats]) (*nex.RMCMessage, *nex.Error))
SetHandlerReportRatingStats sets the handler for the ReportRatingStats method
func (*Protocol) SetHandlerUnk1 ¶
func (protocol *Protocol) SetHandlerUnk1(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerUnk1 sets the handler for the Unk1 method TODO - Find name if possible
func (*Protocol) SetHandlerUnk2 ¶
func (protocol *Protocol) SetHandlerUnk2(handler func(err error, packet nex.PacketInterface, callID uint32, sessionToken rating_types.RatingSessionToken) (*nex.RMCMessage, *nex.Error))
SetHandlerUnk2 sets the handler for the Unk2 method TODO - Find name if possible
func (*Protocol) SetHandlerUploadCommonData ¶ added in v2.2.2
func (protocol *Protocol) SetHandlerUploadCommonData(handler func(err error, packet nex.PacketInterface, callID uint32, commonData types.Buffer, uniqueID types.UInt64) (*nex.RMCMessage, *nex.Error))
SetHandlerUploadCommonData sets the handler for the UploadCommonData method