Documentation
¶
Index ¶
- Constants
- type ConnectedPing
- type ConnectedPong
- type ConnectionRequest
- type ConnectionRequestAccepted
- type IncompatibleProtocolVersion
- type NewIncomingConnection
- type OpenConnectionReply1
- type OpenConnectionReply2
- type OpenConnectionRequest1
- type OpenConnectionRequest2
- type UnconnectedPing
- type UnconnectedPong
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 {
PingTime int64
}
func (*ConnectedPing) MarshalBinary ¶
func (pk *ConnectedPing) MarshalBinary() (data []byte, err error)
func (*ConnectedPing) UnmarshalBinary ¶
func (pk *ConnectedPing) UnmarshalBinary(data []byte) error
type ConnectedPong ¶
func (*ConnectedPong) MarshalBinary ¶
func (pk *ConnectedPong) MarshalBinary() (data []byte, err error)
func (*ConnectedPong) UnmarshalBinary ¶
func (pk *ConnectedPong) UnmarshalBinary(data []byte) error
type ConnectionRequest ¶
type ConnectionRequest struct { ClientGUID int64 // RequestTime is a timestamp from the moment the packet is sent. RequestTime int64 Secure bool }
func (*ConnectionRequest) MarshalBinary ¶
func (pk *ConnectionRequest) MarshalBinary() (data []byte, err error)
func (*ConnectionRequest) UnmarshalBinary ¶
func (pk *ConnectionRequest) UnmarshalBinary(data []byte) error
type ConnectionRequestAccepted ¶
type ConnectionRequestAccepted struct { ClientAddress netip.AddrPort SystemIndex uint16 SystemAddresses systemAddresses // PingTime is filled out with ConnectionRequest.RequestTime. PingTime int64 // PongTime is a timestamp from the moment the packet is sent. PongTime int64 }
func (*ConnectionRequestAccepted) MarshalBinary ¶
func (pk *ConnectionRequestAccepted) MarshalBinary() (data []byte, err error)
func (*ConnectionRequestAccepted) UnmarshalBinary ¶
func (pk *ConnectionRequestAccepted) UnmarshalBinary(data []byte) error
type IncompatibleProtocolVersion ¶
func (*IncompatibleProtocolVersion) MarshalBinary ¶
func (pk *IncompatibleProtocolVersion) MarshalBinary() (data []byte, err error)
func (*IncompatibleProtocolVersion) UnmarshalBinary ¶
func (pk *IncompatibleProtocolVersion) UnmarshalBinary(data []byte) error
type NewIncomingConnection ¶
type NewIncomingConnection struct { ServerAddress netip.AddrPort SystemAddresses systemAddresses // PingTime is filled out with ConnectionRequestAccepted.PongTime. PingTime int64 // PongTime is a timestamp from the moment the packet is sent. PongTime int64 }
func (*NewIncomingConnection) MarshalBinary ¶
func (pk *NewIncomingConnection) MarshalBinary() (data []byte, err error)
func (*NewIncomingConnection) UnmarshalBinary ¶
func (pk *NewIncomingConnection) UnmarshalBinary(data []byte) error
type OpenConnectionReply1 ¶
type OpenConnectionReply1 struct { ServerGUID int64 ServerHasSecurity bool Cookie uint32 MTU uint16 }
func (*OpenConnectionReply1) MarshalBinary ¶
func (pk *OpenConnectionReply1) MarshalBinary() (data []byte, err error)
func (*OpenConnectionReply1) UnmarshalBinary ¶
func (pk *OpenConnectionReply1) UnmarshalBinary(data []byte) error
type OpenConnectionReply2 ¶
type OpenConnectionReply2 struct { ServerGUID int64 ClientAddress netip.AddrPort MTU uint16 DoSecurity bool }
func (*OpenConnectionReply2) MarshalBinary ¶
func (pk *OpenConnectionReply2) MarshalBinary() (data []byte, err error)
func (*OpenConnectionReply2) UnmarshalBinary ¶
func (pk *OpenConnectionReply2) UnmarshalBinary(data []byte) error
type OpenConnectionRequest1 ¶
func (*OpenConnectionRequest1) MarshalBinary ¶
func (pk *OpenConnectionRequest1) MarshalBinary() (data []byte, err error)
func (*OpenConnectionRequest1) UnmarshalBinary ¶
func (pk *OpenConnectionRequest1) UnmarshalBinary(data []byte) error
type OpenConnectionRequest2 ¶
type OpenConnectionRequest2 struct { ServerAddress netip.AddrPort MTU uint16 ClientGUID int64 // ServerHasSecurity specifies if the server has security enabled (and thus // a cookie must be sent in this packet). This field is NOT written in this // packet, so it must be set appropriately even when calling // UnmarshalBinary. ServerHasSecurity bool Cookie uint32 }
func (*OpenConnectionRequest2) MarshalBinary ¶
func (pk *OpenConnectionRequest2) MarshalBinary() (data []byte, err error)
func (*OpenConnectionRequest2) UnmarshalBinary ¶
func (pk *OpenConnectionRequest2) UnmarshalBinary(data []byte) error
type UnconnectedPing ¶
func (*UnconnectedPing) MarshalBinary ¶
func (pk *UnconnectedPing) MarshalBinary() (data []byte, err error)
func (*UnconnectedPing) UnmarshalBinary ¶
func (pk *UnconnectedPing) UnmarshalBinary(data []byte) error
type UnconnectedPong ¶
type UnconnectedPong struct { // PingTime is filled out using UnconnectedPing.PingTime. PingTime int64 ServerGUID int64 Data []byte }
func (*UnconnectedPong) MarshalBinary ¶
func (pk *UnconnectedPong) MarshalBinary() (data []byte, err error)
func (*UnconnectedPong) UnmarshalBinary ¶
func (pk *UnconnectedPong) UnmarshalBinary(data []byte) error
Source Files
¶
- addr.go
- connected_ping.go
- connected_pong.go
- connection_request.go
- connection_request_accepted.go
- id.go
- incompatible_protocol_version.go
- new_incoming_connection.go
- open_connection_reply_1.go
- open_connection_reply_2.go
- open_connection_request_1.go
- open_connection_request_2.go
- unconnected_ping.go
- unconnected_pong.go
Click to show internal directories.
Click to hide internal directories.