protocol

package
v0.0.0-...-563cb2d Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdAuthenticate = 0x00
	CmdConnect      = 0x01
	CmdPacket       = 0x02
	CmdDissociate   = 0x03
	CmdHeartbeat    = 0x04
)
View Source
const (
	HeaderLen       = 2
	PacketLen       = 8
	AuthenticateLen = 48
	DissociateLen   = 2
)
View Source
const (
	NetworkTcp = "tcp"
	NetworkUdp = "udp"
)
View Source
const (
	UdpRelayModeQuic   = "quic"
	UdpRelayModeNative = "native"
)
View Source
const (
	NormalClosed   = quic.StreamErrorCode(0)
	ClientCanceled = quic.StreamErrorCode(1)
	ServerCanceled = quic.StreamErrorCode(2)
)
View Source
const DefaultConcurrentStreams int64 = 32
View Source
const VersionMajor = 0x05

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Version uint8
	Type    uint8
	Options options.IOption
}

func (*Command) Marshal

func (cmd *Command) Marshal() ([]byte, error)

func (*Command) Unmarshal

func (cmd *Command) Unmarshal(stream io.Reader) error

type PacketResponse

type PacketResponse struct {
	PacketID uint32
	Data     []byte
}

Jump to

Keyboard shortcuts

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