interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdCustomTCPServer, IdTCPServer, idcontext;
type
TForm1 =
class(TForm)
IdTCPServer1: TIdTCPServer;
procedure FormCreate(Sender: TObject);
procedure IdTCPServer1Execute(AContext: TIdContext);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
begin
with acontext.Connection.IOHandler
do
begin
WriteLn('
Hello from Basic Indy Server server.');
idTcpServer1.Active:=false;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
idTCPserver1.Active:=true;
end;
end.