Documentation ¶
Index ¶
- Constants
- func Marshal(pk Packet, senderID uint64) []byte
- type Header
- type ListenConfig
- type Listener
- func (l *Listener) Close() (err error)
- func (l *Listener) Credentials() (*nethernet.Credentials, error)
- func (l *Listener) PongData(b []byte)
- func (l *Listener) ReadSignal(cancel <-chan struct{}) (*nethernet.Signal, error)
- func (l *Listener) ServerData(d *ServerData)
- func (l *Listener) WriteSignal(signal *nethernet.Signal) error
- type MessagePacket
- type Packet
- type RequestPacket
- type ResponsePacket
- type ServerData
Constants ¶
View Source
const ( IDRequestPacket uint16 = iota IDResponsePacket IDMessagePacket )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ListenConfig ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func (*Listener) Credentials ¶
func (*Listener) ReadSignal ¶
func (*Listener) ServerData ¶
func (l *Listener) ServerData(d *ServerData)
func (*Listener) WriteSignal ¶
type MessagePacket ¶
func (*MessagePacket) ID ¶
func (*MessagePacket) ID() uint16
func (*MessagePacket) Write ¶
func (pk *MessagePacket) Write(w io.Writer)
type RequestPacket ¶
type RequestPacket struct{}
func (*RequestPacket) ID ¶
func (*RequestPacket) ID() uint16
func (*RequestPacket) Write ¶
func (*RequestPacket) Write(io.Writer)
type ResponsePacket ¶
type ResponsePacket struct {
ApplicationData []byte
}
func (*ResponsePacket) ID ¶
func (*ResponsePacket) ID() uint16
func (*ResponsePacket) Write ¶
func (pk *ResponsePacket) Write(w io.Writer)
type ServerData ¶
type ServerData struct { Version uint8 ServerName string LevelName string GameType int32 PlayerCount int32 MaxPlayerCount int32 IsEditorWorld bool TransportLayer int32 }
func (*ServerData) MarshalBinary ¶
func (d *ServerData) MarshalBinary() ([]byte, error)
func (*ServerData) UnmarshalBinary ¶
func (d *ServerData) UnmarshalBinary(data []byte) error
Click to show internal directories.
Click to hide internal directories.