Delphi Using Indy 10

1.2k views Asked by At

I'm using Delphi 4, and I want to create a standard non blocking socket with out the clutter of Indy code (Pv4 and Pv6). and i want to get the computers IP address and be able to ping has any one done this. Can I do it with Indy 10 or Indy 9. And has any one made code up to do any of these things and tested it please.

1

There are 1 answers

0
Remy Lebeau On

Indy officially stopped supporting Delphi 4 a long time ago. Delphi 5 is the earliest version still supported. Delphi has its own socket classes - TClientSocket and TServerSocket - which can operate in both blocking and non-blocking modes. Indy operates strictly in blocking mode only.

Without using Indy, you can get the machine's IP(s) using either the WinSock API's gethostname and gethostbyname functions, or the Win32 API's GetAdapterAddresses or related functions, and use the Win32 API IcmpSendEcho function to ping.