Board index » delphi » SIMPLE QUESTION: Indy Components v 9.0 : Returning Clients IP address

SIMPLE QUESTION: Indy Components v 9.0 : Returning Clients IP address

Heya,
Ive just started using Indy components having been used to other packages, and there seems no easy way to return the client's IP address using the component TIdTCPServer. When they connect, or send a message (onEXECUTE), you can retreive the person's Hostname easily (athread.connection.localname), but why can't you get at their IP address??? Please help me!! It would be very much appreciated. I don't want have to create a new class and store all the clients details to have to retrieve them everytime somebody sends a message. I can see this being done within the example, but seems too overcomplicated for such a regular and simple task. Please write soon, Henry.

 

Re:SIMPLE QUESTION: Indy Components v 9.0 : Returning Clients IP address


"Henry Thacker" <henrythac...@hotmail.com> wrote in
news:3ebbdc7e$1@newsgroups.borland.com:

Quote
> Ive just started using Indy components having been used to other
> packages, and there seems no easy way to return the client's IP address
> using the component TIdTCPServer. When they connect, or send a message

AThread.Connection.Socket.PeerIP IIRC.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

  Is Indy useful to you? Send a postcard please!
  http://www.hower.org/kudzu/indypost.html

ELKNews - Get your free copy at http://www.atozedsoftware.com

Re:SIMPLE QUESTION: Indy Components v 9.0 : Returning Clients IP address


Or possibly:

AThread.Connection.Socket.Binding.PeerIP?

Regards,
Bruce McGee
Glooscap Software

Chad Z. Hower aka Kudzu wrote:

Quote
> AThread.Connection.Socket.PeerIP IIRC.

> --
> Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
>       "Programming is an art form that fights back"

>   Is Indy useful to you? Send a postcard please!
>   http://www.hower.org/kudzu/indypost.html

> ELKNews - Get your free copy at http://www.atozedsoftware.com

Re:SIMPLE QUESTION: Indy Components v 9.0 : Returning Clients IP address


Bruce McGee <bmc...@ionline.net> wrote in news:3ebd8a14
@newsgroups.borland.com:

Quote
> AThread.Connection.Socket.Binding.PeerIP?

Yep, thats it. :)

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
      "Programming is an art form that fights back"

  Is Indy useful to you? Send a postcard please!
  http://www.hower.org/kudzu/indypost.html

ELKNews - Get your free copy at http://www.atozedsoftware.com

Other Threads