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: 1

Documentation

Overview

Package protocol implements the Ticket Granting protocol

Package protocol implements the Ticket Granting protocol

Package protocol implements the Ticket Granting protocol

Package protocol implements the Ticket Granting protocol

Package protocol implements the Ticket Granting protocol

Package protocol implements the Ticket Granting protocol

Package protocol implements the Ticket Granting protocol

Index

Constants

View Source
const (
	// ProtocolID is the protocol ID for the Ticket Granting protocol
	ProtocolID = 0xA

	// MethodLogin is the method ID for the method Login
	MethodLogin = 0x1

	// MethodLoginEx is the method ID for the method LoginEx
	MethodLoginEx = 0x2

	// MethodRequestTicket is the method ID for the method RequestTicket
	MethodRequestTicket = 0x3

	// MethodGetPID is the method ID for the method GetPID
	MethodGetPID = 0x4

	// MethodGetName is the method ID for the method GetName
	MethodGetName = 0x5

	// MethodLoginWithContext is the method ID for the method LoginWithContext
	MethodLoginWithContext = 0x6
)

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 stores all the RMC method handlers for the Ticket Granting protocol and listens for requests

func NewProtocol added in v1.0.45

func NewProtocol(server *nex.Server) *Protocol

NewProtocol returns a new Ticket Granting protocol

func (*Protocol) GetName added in v1.0.45

func (protocol *Protocol) GetName(handler func(err error, packet nex.PacketInterface, callID uint32, userPID uint32) uint32)

GetName sets the GetName handler function

func (*Protocol) GetPID added in v1.0.45

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

GetPID sets the GetPID handler function

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) Login added in v1.0.45

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

Login sets the Login handler function

func (*Protocol) LoginEx added in v1.0.45

func (protocol *Protocol) LoginEx(handler func(err error, packet nex.PacketInterface, callID uint32, strUserName string, oExtraData *nex.DataHolder) uint32)

LoginEx sets the LoginEx handler function

func (*Protocol) LoginWithContext added in v1.0.46

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

LoginWithContext sets the LoginWithContext handler function

func (*Protocol) RequestTicket added in v1.0.45

func (protocol *Protocol) RequestTicket(handler func(err error, packet nex.PacketInterface, callID uint32, idSource uint32, idTarget uint32) uint32)

RequestTicket sets the RequestTicket handler function

func (*Protocol) Setup added in v1.0.45

func (protocol *Protocol) Setup()

Setup initializes the protocol

Directories

Path Synopsis
Package types implements all the types used by the Ticket Granting protocol
Package types implements all the types used by the Ticket Granting protocol

Jump to

Keyboard shortcuts

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