debug

package
v0.0.0-...-34f5af7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNKNOWN          = "?"
	PATCH_SERVER     = "PATCH"
	DATA_SERVER      = "DATA"
	LOGIN_SERVER     = "LOGIN"
	CHARACTER_SERVER = "CHARACTER"
	SHIP_SERVER      = "SHIP"
	BLOCK_SERVER     = "BLOCK"
)
View Source
const PacketLineLength = 16

Variables

View Source
var (
	SERVER_TYPE = "server_type"
)

Functions

func PrintPacket

func PrintPacket(params PrintPacketParams)

PrintPacket prints the contents of a packet to a specified writer along with some inferred metadata about the packet itself.

func StartPprofServer

func StartPprofServer(logger *logrus.Logger, pprofPort int)

This function starts the default pprof HTTP server that can be accessed via localhost to get runtime information about archon. See https://golang.org/pkg/net/http/pprof/

Types

type PrintPacketParams

type PrintPacketParams struct {
	Writer       *bufio.Writer
	ServerType   ServerType
	ClientPacket bool
	Data         []byte
	// Cut off the packet output after a certain size.
	TruncateThreshold int
	// For known packet types, read the data into each packet and
	// emit it as formatted JSON.
	Interpret bool
}

type ServerType

type ServerType string

type Tag

type Tag string

Used with Clients to attach debugging information.

Jump to

Keyboard shortcuts

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