Documentation
¶
Index ¶
- type Conn
- func (c *Conn) Close() (err error)
- func (c *Conn) GameData() minecraft.GameData
- func (c *Conn) ReadDeferred() []packet.Packet
- func (c *Conn) ReadPacket(decode bool) (any, error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) Spawn() (err error)
- func (c *Conn) WritePacket(pk packet.Packet) error
- type Dialer
- type Discovery
- type StaticDiscovery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a connection to a server. It is used to read and write packets to the server, and to manage the connection to the server.
func (*Conn) ReadDeferred ¶
ReadDeferred reads all packets deferred in the connection and returns them. It returns an empty slice if no packets were deferred.
func (*Conn) ReadPacket ¶
ReadPacket reads a packet from the connection. It returns the packet read, or an error if the packet could not be read.
type Dialer ¶
type Dialer struct { Origin string ClientData login.ClientData IdentityData login.IdentityData }
type StaticDiscovery ¶
type StaticDiscovery struct {
// contains filtered or unexported fields
}
func NewStaticDiscovery ¶
func NewStaticDiscovery(server string) *StaticDiscovery
Click to show internal directories.
Click to hide internal directories.