unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
IdBaseComponent, IdComponent, IdTCPServer, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
procedure myExecute(AThread: TIdPeerThread);
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
var IdTCPSvr : TIdTCPServer;
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
IdTCPSvr := TIdTCPServer.Create(nil);
IdTCPSvr.DefaultPort := 1234;
IdTCPSvr.OnExecute := myExecute;
IdTCPSvr.Active := true;
end;
procedure TForm1.myExecute(AThread: TIdPeerThread);
begin
// hier Den Execute-Code einfügen
end;
end.