RconClient

An Rcon session runs in a dedicated thread and only waits for data on a blocking socket after the login.

The first login packet must arrive within 1 second since the creation of the session and it must be a login packet with the password in it. If the packet doesn't arrive, its format is wrong or the password is wrong the session is closed.

Once successfully connected the socket's receive timeout is set to infinite and the session only waits for remote commands.

The session never times out and it's only closed when the remote socket has been closed or a packet with the wrong format is received.

Constructors

this
this(HubServer server, Socket socket)
Undocumented in source.

Members

Functions

consoleMessage
void consoleMessage(string message, int id)
Undocumented in source. Be warned that the author may not have intended to support it.
loop
void loop()

Waits for a command packet and let the server parse it if it is longer than 0 bytes.

send
ptrdiff_t send(ubyte[4] request_id, int id, ubyte[] payload)

Sends a packet back using the given request id.

send
ptrdiff_t send(const(void)[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()

Represented as "Rcon(id, address:port)".

Variables

id
uint id;
Undocumented in source.

Meta