Documentation
¶
Index ¶
- Constants
- func Unpack(pac *Packet) ([]byte, error)
- type Header
- type Packet
- type PacketType
- type Rconn
- func (c *Rconn) Auth(password string) error
- func (c *Rconn) AuthTimeout(password string, timeout time.Duration) error
- func (c *Rconn) ExecCommand(command string) (string, error)
- func (c *Rconn) ExecCommandTimeout(command string, timeout time.Duration) (string, error)
- func (c *Rconn) ReadPacket(pac *Packet) error
- func (c *Rconn) ReadPacketTimeout(pac *Packet, timeout time.Duration) error
- func (c *Rconn) WritePacket(pac *Packet) error
- func (c *Rconn) WritePacketTimeout(pac *Packet, timeout time.Duration) error
Constants ¶
View Source
const ( BadAuthRequestId = -1 RequestPayloadMaxLength = 1446 ResponsePayloadMaxLength = 4096 )
View Source
const ( Auth = PacketType(3) ExecCommand = PacketType(2) ResponseValue = PacketType(0) DummyRequest = PacketType(100) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Header ¶
type Header struct {
Length int32
RequestId int32
Type PacketType
}
type PacketType ¶
type PacketType int32
type Rconn ¶
func (*Rconn) AuthTimeout ¶ added in v0.1.0
func (*Rconn) ExecCommandTimeout ¶ added in v0.1.0
func (*Rconn) ReadPacket ¶
func (*Rconn) ReadPacketTimeout ¶ added in v0.1.0
func (*Rconn) WritePacket ¶
Click to show internal directories.
Click to hide internal directories.