Documentation ¶
Overview ¶
Package protocol implements the Subscription protocol
Package protocol implements the Subscription protocol ¶
Package protocol implements the Subscription protocol ¶
Package protocol implements the Subscription protocol ¶
Package protocol implements the Subscription protocol ¶
Package protocol implements the Subscription protocol ¶
Package protocol implements the Subscription protocol ¶
Package protocol implements the Subscription protocol ¶
Package protocol implements the Subscription 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) SetHandlerCreateMySubscriptionData(...)
- func (protocol *Protocol) SetHandlerGetActivePlayerSubscriptionData(...)
- func (protocol *Protocol) SetHandlerGetFriendSubscriptionData(...)
- func (protocol *Protocol) SetHandlerGetPrivacyLevels(...)
- func (protocol *Protocol) SetHandlerGetSubscriptionData(...)
- func (protocol *Protocol) SetHandlerGetTargetSubscriptionData(...)
- func (protocol *Protocol) SetHandlerReplaceTargetAndGetSubscriptionData(...)
- func (protocol *Protocol) SetHandlerUpdateMySubscriptionData(...)
Constants ¶
const ( // ProtocolID is the protocol ID for the Subscription protocol ProtocolID = 0x75 // MethodCreateMySubscriptionData is the method ID for the method CreateMySubscriptionDataID MethodCreateMySubscriptionData = 0x1 // MethodUpdateMySubscriptionData is the method ID for the method UpdateMySubscriptionData MethodUpdateMySubscriptionData = 0x2 // MethodClearMySubscriptionData is the method ID for the method ClearMySubscriptionDataID MethodClearMySubscriptionData = 0x3 // MethodAddTarget is the method ID for the method AddTarget MethodAddTarget = 0x4 // MethodDeleteTarget is the method ID for the method DeleteTarget MethodDeleteTarget = 0x5 // MethodClearTarget is the method ID for the method ClearTarget MethodClearTarget = 0x6 // MethodGetFriendSubscriptionData is the method ID for the method GetFriendSubscriptionData MethodGetFriendSubscriptionData = 0x7 // MethodGetTargetSubscriptionData is the method ID for the method GetTargetSubscriptionData MethodGetTargetSubscriptionData = 0x8 // MethodGetActivePlayerSubscriptionData is the method ID for the method GetActivePlayerSubscriptionData MethodGetActivePlayerSubscriptionData = 0x9 // MethodGetSubscriptionData is the method ID for the method GetSubscriptionData MethodGetSubscriptionData = 0xA // MethodReplaceTargetAndGetSubscriptionData is the method ID for the method ReplaceTargetAndGetSubscriptionData MethodReplaceTargetAndGetSubscriptionData = 0xB // MethodSetPrivacyLevel is the method ID for the method SetPrivacyLevel MethodSetPrivacyLevel = 0xC // MethodGetPrivacyLevel is the method ID for the method GetPrivacyLevel MethodGetPrivacyLevel = 0xD // MethodGetSubscriptionUserFriendList is the method ID for the method GetSubscriptionUserFriendList MethodGetSubscriptionUserFriendList = 0xE // MethodGetPrivacyLevels is the method ID for the method GetPrivacyLevels MethodGetPrivacyLevels = 0xF )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Endpoint() nex.EndpointInterface SetEndpoint(endpoint nex.EndpointInterface) SetHandlerCreateMySubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32, unk *types.PrimitiveU64, content []byte) (*nex.RMCMessage, *nex.Error)) SetHandlerUpdateMySubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32, unk *types.PrimitiveU32, content []byte) (*nex.RMCMessage, *nex.Error)) SetHandlerGetFriendSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) SetHandlerGetTargetSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) SetHandlerGetActivePlayerSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) SetHandlerGetSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32, pids *types.List[*types.PrimitiveU32]) (*nex.RMCMessage, *nex.Error)) SetHandlerReplaceTargetAndGetSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) SetHandlerGetPrivacyLevels(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) }
Interface implements the methods present on the Subscription protocol struct
type Protocol ¶
type Protocol struct { CreateMySubscriptionData func(err error, packet nex.PacketInterface, callID uint32, unk *types.PrimitiveU64, content []byte) (*nex.RMCMessage, *nex.Error) UpdateMySubscriptionData func(err error, packet nex.PacketInterface, callID uint32, unk *types.PrimitiveU32, content []byte) (*nex.RMCMessage, *nex.Error) GetFriendSubscriptionData func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) GetTargetSubscriptionData func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) GetActivePlayerSubscriptionData func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) GetSubscriptionData func(err error, packet nex.PacketInterface, callID uint32, pids *types.List[*types.PrimitiveU32]) (*nex.RMCMessage, *nex.Error) ReplaceTargetAndGetSubscriptionData func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) GetPrivacyLevels func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) Patches nex.ServiceProtocol PatchedMethods []uint32 // contains filtered or unexported fields }
Protocol handles the Subscription nex 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) SetHandlerCreateMySubscriptionData ¶
func (protocol *Protocol) SetHandlerCreateMySubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32, unk *types.PrimitiveU64, content []byte) (*nex.RMCMessage, *nex.Error))
SetHandlerCreateMySubscriptionData sets the handler for the CreateMySubscriptionData method
func (*Protocol) SetHandlerGetActivePlayerSubscriptionData ¶
func (protocol *Protocol) SetHandlerGetActivePlayerSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerGetActivePlayerSubscriptionData sets the handler for the GetActivePlayerSubscriptionData method
func (*Protocol) SetHandlerGetFriendSubscriptionData ¶
func (protocol *Protocol) SetHandlerGetFriendSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerGetFriendSubscriptionData sets the handler for the GetFriendSubscriptionData method
func (*Protocol) SetHandlerGetPrivacyLevels ¶
func (protocol *Protocol) SetHandlerGetPrivacyLevels(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerGetPrivacyLevels sets the handler for the GetPrivacyLevels method
func (*Protocol) SetHandlerGetSubscriptionData ¶
func (protocol *Protocol) SetHandlerGetSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32, pids *types.List[*types.PrimitiveU32]) (*nex.RMCMessage, *nex.Error))
SetHandlerGetSubscriptionData sets the handler for the GetSubscriptionData method
func (*Protocol) SetHandlerGetTargetSubscriptionData ¶
func (protocol *Protocol) SetHandlerGetTargetSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerGetTargetSubscriptionData sets the handler for the GetTargetSubscriptionData method
func (*Protocol) SetHandlerReplaceTargetAndGetSubscriptionData ¶
func (protocol *Protocol) SetHandlerReplaceTargetAndGetSubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerReplaceTargetAndGetSubscriptionData sets the handler for the ReplaceTargetAndGetSubscriptionData method
func (*Protocol) SetHandlerUpdateMySubscriptionData ¶
func (protocol *Protocol) SetHandlerUpdateMySubscriptionData(handler func(err error, packet nex.PacketInterface, callID uint32, unk *types.PrimitiveU32, content []byte) (*nex.RMCMessage, *nex.Error))
SetHandlerUpdateMySubscriptionData sets the handler for the UpdateMySubscriptionData method