protocol

package
v1.0.58 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package protocol implements the Remote Log Device protocol

Package protocol implements the Remote Log Device protocol

Index

Constants

View Source
const (
	// ProtocolID is the protocol ID for the RemoteLogDevice protocol
	ProtocolID = 0x1

	// MethodLog is the method ID for the method Log
	MethodLog = 0x1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol added in v1.0.45

type Protocol struct {
	Server *nex.Server
	// contains filtered or unexported fields
}

Protocol handles the RemoteLogDevice protocol

func NewProtocol added in v1.0.45

func NewProtocol(server *nex.Server) *Protocol

NewProtocol returns a new Remote Log Device protocol

func (*Protocol) HandlePacket added in v1.0.45

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

HandlePacket sends the packet to the correct RMC method handler

func (*Protocol) Log added in v1.0.45

func (protocol *Protocol) Log(handler func(err error, packet nex.PacketInterface, callID uint32, strLine string) uint32)

Log sets the Log handler function

func (*Protocol) Setup added in v1.0.45

func (protocol *Protocol) Setup()

Setup initializes the protocol

Jump to

Keyboard shortcuts

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