unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPServer;
type
TForm1 = class(TForm)
TCPServer1: TIdTCPServer;
procedure FormCreate(Sender: TObject);
procedure TCPServer1Execute(AContext: TIdContext);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.TCPServer1Execute(AContext: TIdContext);
begin
with AThread.Connection do
begin
WriteLn('Hello from Basic
Indy Server server.');
Disconnect;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
TCPServer.Active := True;
end;
end.