Documentation
¶
Index ¶
Constants ¶
const ( //rcon packet type values FailurePacket = int32(-1) CommandPacket = int32(2) AuthPacket = int32(3) //tcp constants Protocol = "tcp" PacketRequestSize = 10 //size of headers plus padding bytes, not including Size header per RCon standard PacketHeaderSize = 8 //size of headers not including Size header per RCon standard PacketPaddingSize = 2 //size of padding required after body //default values ResetID = 1 DefaultCap = 100 DefaultTimeout = time.Second * 10 DefaultPort = 61695 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
remote console client
func NewClient ¶
creates a new remote console client configured with the supplied options. The client does not connect to the server until the Connect method is called to authenticate the client. Check the README for information on default values
func (*Client) Close ¶
closes remote console connection, nil's out the connection value in client struct, and resets the request id
func (*Client) Command ¶
sends a command to the server and returns the server response, an error is returned if the client has not connected to the server before attempting to send a command
func (*Client) CommandNoResponse ¶ added in v1.3.2
sends a command to the server without waiting for the response, an error is returned if the client has not connected to the server before attempting to send a command
type Option ¶ added in v0.2.0
type Option func(cn *Client)
request option func skeleton
func WithConnection ¶ added in v1.1.1
option to allow for use of custom connections
func WithTimeout ¶ added in v0.2.0
option to allow for custom timeout values