Documentation ¶
Overview ¶
Package net pack network connection for Minecraft.
Index ¶
- Constants
- type Conn
- type Listener
- type RCONClientConn
- type RCONConn
- func (r *RCONConn) AcceptCmd() (string, error)
- func (r *RCONConn) AcceptLogin(password string) error
- func (r *RCONConn) Cmd(cmd string) error
- func (r *RCONConn) ReadPacket() (RequestID, Type int32, Payload string, err error)
- func (r *RCONConn) Resp() (resp string, err error)
- func (r *RCONConn) RespCmd(resp string) error
- func (r *RCONConn) WritePacket(RequestID, Type int32, Payload string) error
- type RCONListener
- type RCONServerConn
- type ReadWriter
- type Reader
- type Writer
Constants ¶
View Source
const MaxRCONPackageSize = 4096
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn is a minecraft Connection
func DialMCTimeout ¶
DialMCTimeout acts like DialMC but takes a timeout.
func WrapConn ¶
WrapConn warp an net.Conn to MC-Conn Helps you modify the connection process (eg. using DialContext).
func (*Conn) ReadPacket ¶
ReadPacket read a Packet from Conn.
func (*Conn) SetThreshold ¶
SetThreshold set threshold to Conn. The data packet with length longer then threshold will be compress when sending.
type Listener ¶
A Listener is a minecraft Listener
type RCONClientConn ¶
type RCONListener ¶
func ListenRCON ¶
func ListenRCON(addr string) (*RCONListener, error)
func (*RCONListener) Accept ¶
func (r *RCONListener) Accept() (RCONServerConn, error)
type RCONServerConn ¶
type ReadWriter ¶
Click to show internal directories.
Click to hide internal directories.