Autor Beitrag
Fighti
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32

Win 2000 / SuSE Linux 8.2 (dualboot)
Delphi 7 Pro / Kylix 3 Pro
BeitragVerfasst: Mi 21.09.05 12:05 
Hallo zusammen,
kann mit jemand sagen wie ich die IP oder den Hostnamen eines Clienent ermitteln kann,
welcher auf meinen Server zugreift.

Ich verwende beim Client, die TIdTCPClient Komponente von Indy und beim Server die TIdTCPServer Komponente.

Vielen Dank für eure Mithilfe.

Gruss fighti
Fighti Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32

Win 2000 / SuSE Linux 8.2 (dualboot)
Delphi 7 Pro / Kylix 3 Pro
BeitragVerfasst: Mi 21.09.05 12:50 
Ok, ich habe es inzwischen selbst rausgefunden.

Für alle die das gleiche Problem haben, man kann die Client IP aus dem AThread auslesen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
...
procedure Tserverform.serverExecute(AThread: TIdPeerThread);
var
   ClientIP : String;
begin
   ClientIP:=AThread.Connection.Socket.Binding.PeerIP;

...


Gruss fighti