(* Collection of code snippets by Arne Vajhøj *)
(* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) *)
program sockcli;

{$APPTYPE CONSOLE}

uses
  SysUtils, IdTCPClient;

var
  cli : TIdTCPClient;

begin
  cli := TIdTCPClient.Create;
  with cli do begin
    Host := 'localhost';
    Port := 1234;
  end;
  cli.Connect;
  cli.Socket.Write('This is a test');
  cli.Disconnect;
  cli.Destroy;
end.
