mcrcd



struct MCRconResponse;
Response for Rcon packets.

this(ubyte[] _data, int _responseID = -1);


int responseID;
Response ID for packets.
-1
on login error.

const @property string unformatted();
Automatically removes all ยง codes from text.

ubyte[] data;
char[] text;
Raw data containing response.

enum MCRconPacket: int;


Command


Login


class MCRcon;
Rcon class for connections.

void connect(string host, short port);
Connects to
host:port
and creates a new socket.

void disconnect();
Disconnects from the server.

@property bool isConnected();
Returns if still connected to the server.

MCRconResponse send(MCRconPacket packetID, string data);
Sends a packet containing
data
with
packetID
as ID and returns the data synchronously.

auto command(string command);
Shorthand for
send(MCRconPacket.Command, command)


auto login(string password);
Shorthand for
send(MCRconPacket.Login, password)



Page generated by Ddoc.