message

package
v0.0.0-...-d1826b6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: AGPL-3.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDConnectedPing                  byte = 0x00
	IDUnconnectedPing                byte = 0x01
	IDUnconnectedPingOpenConnections byte = 0x02
	IDConnectedPong                  byte = 0x03
	IDDetectLostConnections          byte = 0x04
	IDOpenConnectionRequest1         byte = 0x05
	IDOpenConnectionReply1           byte = 0x06
	IDOpenConnectionRequest2         byte = 0x07
	IDOpenConnectionReply2           byte = 0x08
	IDConnectionRequest              byte = 0x09
	IDConnectionRequestAccepted      byte = 0x10
	IDNewIncomingConnection          byte = 0x13
	IDDisconnectNotification         byte = 0x15

	IDIncompatibleProtocolVersion byte = 0x19

	IDUnconnectedPong byte = 0x1c
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectedPing

type ConnectedPing struct {
	ClientTimestamp int64
}

func (*ConnectedPing) Read

func (pk *ConnectedPing) Read(buf *bytes.Buffer) error

func (*ConnectedPing) Write

func (pk *ConnectedPing) Write(buf *bytes.Buffer)

type ConnectedPong

type ConnectedPong struct {
	ClientTimestamp int64
	ServerTimestamp int64
}

func (*ConnectedPong) Read

func (pk *ConnectedPong) Read(buf *bytes.Buffer) error

func (*ConnectedPong) Write

func (pk *ConnectedPong) Write(buf *bytes.Buffer)

type ConnectionRequest

type ConnectionRequest struct {
	ClientGUID       int64
	RequestTimestamp int64
	Secure           bool
}

func (*ConnectionRequest) Read

func (pk *ConnectionRequest) Read(buf *bytes.Buffer) error

func (*ConnectionRequest) Write

func (pk *ConnectionRequest) Write(buf *bytes.Buffer)

type ConnectionRequestAccepted

type ConnectionRequestAccepted struct {
	ClientAddress     net.UDPAddr
	SystemAddresses   [20]net.UDPAddr
	RequestTimestamp  int64
	AcceptedTimestamp int64
}

func (*ConnectionRequestAccepted) Read

func (*ConnectionRequestAccepted) Write

func (pk *ConnectionRequestAccepted) Write(buf *bytes.Buffer)

type IncompatibleProtocolVersion

type IncompatibleProtocolVersion struct {
	Magic          [16]byte
	ServerProtocol byte
	ServerGUID     int64
}

func (*IncompatibleProtocolVersion) Read

func (*IncompatibleProtocolVersion) Write

func (pk *IncompatibleProtocolVersion) Write(buf *bytes.Buffer)

type NewIncomingConnection

type NewIncomingConnection struct {
	ServerAddress     net.UDPAddr
	SystemAddresses   [20]net.UDPAddr
	RequestTimestamp  int64
	AcceptedTimestamp int64
}

func (*NewIncomingConnection) Read

func (pk *NewIncomingConnection) Read(buf *bytes.Buffer) error

func (*NewIncomingConnection) Write

func (pk *NewIncomingConnection) Write(buf *bytes.Buffer)

type OpenConnectionReply1

type OpenConnectionReply1 struct {
	Magic                  [16]byte
	ServerGUID             int64
	Secure                 bool
	ServerPreferredMTUSize uint16
}

func (*OpenConnectionReply1) Read

func (pk *OpenConnectionReply1) Read(buf *bytes.Buffer) error

func (*OpenConnectionReply1) Write

func (pk *OpenConnectionReply1) Write(buf *bytes.Buffer)

type OpenConnectionReply2

type OpenConnectionReply2 struct {
	Magic         [16]byte
	ServerGUID    int64
	ClientAddress net.UDPAddr
	MTUSize       uint16
	Secure        bool
}

func (*OpenConnectionReply2) Read

func (pk *OpenConnectionReply2) Read(buf *bytes.Buffer) error

func (*OpenConnectionReply2) Write

func (pk *OpenConnectionReply2) Write(buf *bytes.Buffer)

type OpenConnectionRequest1

type OpenConnectionRequest1 struct {
	Magic                 [16]byte
	Protocol              byte
	MaximumSizeNotDropped uint16
}

func (*OpenConnectionRequest1) Read

func (pk *OpenConnectionRequest1) Read(buf *bytes.Buffer) error

func (*OpenConnectionRequest1) Write

func (pk *OpenConnectionRequest1) Write(buf *bytes.Buffer)

type OpenConnectionRequest2

type OpenConnectionRequest2 struct {
	Magic                  [16]byte
	ServerAddress          net.UDPAddr
	ClientPreferredMTUSize uint16
	ClientGUID             int64
}

func (*OpenConnectionRequest2) Read

func (pk *OpenConnectionRequest2) Read(buf *bytes.Buffer) error

func (*OpenConnectionRequest2) Write

func (pk *OpenConnectionRequest2) Write(buf *bytes.Buffer)

type UnconnectedPing

type UnconnectedPing struct {
	Magic         [16]byte
	SendTimestamp int64
	ClientGUID    int64
}

func (*UnconnectedPing) Read

func (pk *UnconnectedPing) Read(buf *bytes.Buffer) error

func (*UnconnectedPing) Write

func (pk *UnconnectedPing) Write(buf *bytes.Buffer)

type UnconnectedPong

type UnconnectedPong struct {
	Magic         [16]byte
	SendTimestamp int64
	ServerGUID    int64
	Data          []byte
}

func (*UnconnectedPong) Read

func (pk *UnconnectedPong) Read(buf *bytes.Buffer) error

func (*UnconnectedPong) Write

func (pk *UnconnectedPong) Write(buf *bytes.Buffer)

Jump to

Keyboard shortcuts

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