packet

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	IDConnectionRequest = iota + 500
	IDConnectionResponse
	IDLatency
	IDTransfer
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionRequest

type ConnectionRequest struct {
	Addr  string
	Token string

	ClientData   []byte
	IdentityData []byte
}

func (*ConnectionRequest) ID

func (pk *ConnectionRequest) ID() uint32

ID ...

func (*ConnectionRequest) Marshal

func (pk *ConnectionRequest) Marshal(io protocol.IO)

Marshal ...

type ConnectionResponse

type ConnectionResponse struct {
	RuntimeID uint64
	UniqueID  int64
}

func (*ConnectionResponse) ID

func (pk *ConnectionResponse) ID() uint32

ID ...

func (*ConnectionResponse) Marshal

func (pk *ConnectionResponse) Marshal(io protocol.IO)

Marshal ...

type Latency

type Latency struct {
	Latency   int64
	Timestamp int64
}

func (*Latency) ID

func (pk *Latency) ID() uint32

ID ...

func (*Latency) Marshal

func (pk *Latency) Marshal(io protocol.IO)

Marshal ...

type Transfer

type Transfer struct {
	Addr string
}

func (*Transfer) ID

func (pk *Transfer) ID() uint32

ID ...

func (*Transfer) Marshal

func (pk *Transfer) Marshal(io protocol.IO)

Marshal ...

Jump to

Keyboard shortcuts

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