unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPServer, ExtCtrls,
IdAntiFreezeBase, IdAntiFreeze;
type
TForm1 =
class(TForm)
IdTCPServer1: TIdTCPServer;
Label1: TLabel;
Button1: TButton;
Edit1: TEdit;
IdAntiFreeze1: TIdAntiFreeze;
procedure IdTCPServer1Connect(AThread: TIdPeerThread);
procedure Button1Click(Sender: TObject);
procedure IdTCPServer1Execute(AThread: TIdPeerThread);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
person : tidpeerThread;
implementation
{$R *.dfm}
procedure TForm1.IdTCPServer1Connect(AThread: TIdPeerThread);
begin
label1.Caption := '
online';
person := AThread;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
form1.IdTCPServer1Execute(person);
end;
procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
begin
Athread.Connection.WriteLn(edit1.Text);
end;
end.