Delphi RCON Client

From sgcWebSockets 4.5.1 RCON protocol is supported. The Source RCON Protocol is a TCP/IP-based communication protocol used by Source Dedicated Server, which allows console commands to be issued to the server via a "remote console", or RCON. The most common use of RCON is to allow server owners to control their game servers without direct access to the machine the server is running on.


The RCON_Options allows to configure the following properties:

  • Host: server remote address.
  • Port: server listening port.
  • Password: is the secret string used to authenticate against the server


Use the property Active to Connect / Disconnect from server.

When Active is set to True, the client tries to connect to the server, if can connect, it will try to authenticate using the provided password.

The server will send a response to a Authentication request, the event OnAuthenticate will be called and you can read if authentication is successful or not using the Authenticate parameter.

Send Commands 

Use the method ExecCommand to send commands to the server. The responses will be available OnResponse Event.

oRCON := TsgcLib_RCON.Create(nil);
oRCON.RCON_Options.Host := '';
oRCON.RCON_Options.Port := 25575;
oRCON.RCON_Options.Password := 'test';
oRCON.Active := True;

procedure OnAuthenticate(Sender: TObject; Authenticated: Boolean; const aPacket: TsgcRCON_Packet);
  if Authenticated then
    DoLog('#not authenticated');

procedure OnResponse(Sender: TObject; const aResponse: string; const aPacket: TsgcRCON_Packet);
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

Delphi CryptoHopper Client
SChannel Cipher List and Connection Info

Related Posts