- unit ip;
-
- interface
-
- uses
- SysUtils, Types, Classes, Variants, QGraphics, QControls, QForms, QDialogs,
- IdBaseComponent, IdComponent, IdIPWatch, QStdCtrls, SOAPHTTPTrans,
- IdTCPServer, Sockets;
-
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Edit1: TEdit;
- Button2: TButton;
- IdTCP: TIdTCPServer;
- Edit2: TEdit;
- Tcp: TTcpServer;
- Label1: TLabel;
- Label2: TLabel;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- private
- { Déclarations privées }
- public
- { Déclarations publiques }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.xfm}
-
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- application.Terminate;
-
- end;
-
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- edit1.Text := idTCPserver.localname;
- edit2.Text := Tcpserver.LocalHostAddr();
-
-
- end;
-
- end.
unit ip;
interface
uses
SysUtils, Types, Classes, Variants, QGraphics, QControls, QForms, QDialogs,
IdBaseComponent, IdComponent, IdIPWatch, QStdCtrls, SOAPHTTPTrans,
IdTCPServer, Sockets;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Button2: TButton;
IdTCP: TIdTCPServer;
Edit2: TEdit;
Tcp: TTcpServer;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.xfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
application.Terminate;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.Text := idTCPserver.localname;
edit2.Text := Tcpserver.LocalHostAddr();
end;
end.