Versions in this module Expand all Collapse all v1 v1.20.2 Aug 8, 2023 Changes in this version + const DefaultPort + const MaxRCONPackageSize + var DefaultDialer = Dialer + type Conn struct + Socket net.Conn + func DialMC(addr string) (*Conn, error) + func DialMCTimeout(addr string, timeout time.Duration) (*Conn, error) + func WrapConn(conn net.Conn) *Conn + func (c *Conn) Close() error + func (c *Conn) ReadPacket(p *pk.Packet) error + func (c *Conn) SetCipher(ecoStream, decoStream cipher.Stream) + func (c *Conn) SetThreshold(t int) + func (c *Conn) WritePacket(p pk.Packet) error + type Dialer net.Dialer + func (d *Dialer) DialMCContext(ctx context.Context, addr string) (*Conn, error) + type Listener struct + func ListenMC(addr string) (*Listener, error) + func (l Listener) Accept() (Conn, error) + type MCDialer interface + DialMCContext func(ctx context.Context, addr string) (*Conn, error) + type RCONClientConn interface + Close func() error + Cmd func(cmd string) error + Resp func() (resp string, err error) + func DialRCON(addr string, password string) (client RCONClientConn, err error) + type RCONConn struct + ReqID int32 + 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 struct + func ListenRCON(addr string) (*RCONListener, error) + func (r *RCONListener) Accept() (RCONServerConn, error) + type RCONServerConn interface + AcceptCmd func() (cmd string, err error) + AcceptLogin func(password string) error + Close func() error + RespCmd func(resp string) error + type ReadWriter interface + type Reader interface + ReadPacket func() (pk.Packet, error) + type Writer interface + WritePacket func(p pk.Packet) error