Autor Beitrag
-tyler-
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Mi 23.04.03 16:35 
hallo,
wie kann man mit dem indy tcpserver die ip des clients herausfinden
-tyler- Threadstarter
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Mi 23.04.03 17:19 
Titel: hallo?
weis das keiner oder wat es wird doch wohl nicht so schwer sein mit indytcpserver die ip des clients herauszufinden und wenn das damit nicht geht womit dann.
-tyler- Threadstarter
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Do 24.04.03 15:28 
Titel: hallo
also mal wieder danke für eure hilfe. ich habs jetzt nun selber herausgefunden also die die noch nicht wissen wie das geht hier:

Die IP Adressen des Clients herausfinden mit Indy:
Das ist nur ein Befehl der lautet

AThread.Connection.Socket.Binding.PeerIP;

das wars
focus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187

XP, 2k, 98, Me
D6 Prof
BeitragVerfasst: Do 24.04.03 16:20 
genau...siehe indy sources
ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
  TIdSocketHandle = class(TCollectionItem)
  protected
    FHandle: TIdStackSocketHandle;
    FHandleAllocated: Boolean;
    FIP, FPeerIP: string;
    FPort, FPeerPort: integer;
  public
    procedure Accept(ASocket: TIdStackSocketHandle);
    procedure AllocateSocket(const ASocketType: Integer = Id_SOCK_STREAM;
      const AProtocol: Integer = Id_IPPROTO_IP);

    procedure Assign(Source: TPersistent); override;
    procedure Bind;
    procedure CloseSocket(const AResetLocal: boolean = True); virtual;
    function Connect(const AFamily: Integer = Id_PF_INET): Integer; virtual;
    constructor Create(ACollection: TCollection); override;
    destructor Destroy; override;
    procedure Listen(const anQueueCount: integer = 5);
    function Readable(AMSec: Integer = IdTimeoutDefault): boolean;
    function Recv(var ABuf; ALen, AFlags: Integer): Integer;
    function RecvFrom(var ABuffer; const ALength, AFlags: Integer; var VIP:
      string;
      var VPort: Integer): Integer; virtual;
    procedure Reset(const AResetLocal: boolean = True);
    function Send(var Buf; len, flags: Integer): Integer;
    procedure SendTo(const AIP: string; const APort: Integer; var ABuffer;
      const ABufferSize: Integer);
    procedure SetPeer(const asIP: string; anPort: integer);
    procedure SetSockOpt(level, optname: Integer; optval: PChar; optlen:
      Integer);
    procedure UpdateBindingLocal;
    procedure UpdateBindingPeer;

    property HandleAllocated: Boolean read FHandleAllocated;
    property Handle: TIdStackSocketHandle read FHandle;
    property PeerIP: string read FPeerIP;               // !!!!!!!!!!!!!!!!!!!!
    property PeerPort: integer read FPeerPort;
  published
    property IP: string read FIP write FIP;
    property Port: integer read FPort write FPort;
  end;
DT2158
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Mo 26.05.03 12:22 
ja ich auch probiert liefterte bei mir "0.0.0.0" :?:
Phobeus
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1280

Linux (FC6), WinXP Pro (Box)
D6 Pers, D7 Pro, FPC 2.x
BeitragVerfasst: Mo 26.05.03 12:59 
Besteht den auch eine Connection? Funktioniert einwandfrei...

_________________
"Menschen sterben nicht wenn man sie zu Grabe trägt, sondern wenn sie ihre Träume verlieren..."
DT2158
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Mo 26.05.03 19:25 
komisch jetzt gehts letztens gings nicht