Documentation ¶
Overview ¶
Package protocol implements the Health protocol
Package protocol implements the Health protocol ¶
Package protocol implements the Health protocol ¶
Package protocol implements the Health protocol ¶
Package protocol implements the Health 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) SetHandlerFixSanityErrors(...)
- func (protocol *Protocol) SetHandlerPingDaemon(...)
- func (protocol *Protocol) SetHandlerPingDatabase(...)
- func (protocol *Protocol) SetHandlerRunSanityCheck(...)
Constants ¶
const ( // ProtocolID is the protocol ID for the Health protocol ProtocolID = 0x12 // MethodPingDaemon is the method ID for the method PingDaemon MethodPingDaemon = 0x1 // MethodPingDatabase is the method ID for the method PingDatabase MethodPingDatabase = 0x2 // MethodRunSanityCheck is the method ID for the method RunSanityCheck MethodRunSanityCheck = 0x3 // MethodFixSanityErrors is the method ID for the method FixSanityErrors MethodFixSanityErrors = 0x4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Endpoint() nex.EndpointInterface SetEndpoint(endpoint nex.EndpointInterface) SetHandlerPingDaemon(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) SetHandlerPingDatabase(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) SetHandlerRunSanityCheck(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) SetHandlerFixSanityErrors(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) }
Interface implements the methods present on the Health protocol struct
type Protocol ¶
type Protocol struct { PingDaemon func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) PingDatabase func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) RunSanityCheck func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) FixSanityErrors 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 Health 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) SetHandlerFixSanityErrors ¶
func (protocol *Protocol) SetHandlerFixSanityErrors(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerFixSanityErrors sets the handler for the FixSanityErrors method
func (*Protocol) SetHandlerPingDaemon ¶
func (protocol *Protocol) SetHandlerPingDaemon(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerPingDaemon sets the handler for the PingDaemon method
func (*Protocol) SetHandlerPingDatabase ¶
func (protocol *Protocol) SetHandlerPingDatabase(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerPingDatabase sets the handler for the PingDatabase method
func (*Protocol) SetHandlerRunSanityCheck ¶
func (protocol *Protocol) SetHandlerRunSanityCheck(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerRunSanityCheck sets the handler for the RunSanityCheck method