Search code examples
delphisocketsclient-serverindy

How do I distinguish between 2 Indy clients that connected from the same IP address?


Sorry, links to Indy documentation are currently not working for me. I don't know if the sites are down or whatever but they're not loading in my browser at the moment.

I have a TIdCmdTcpServer in one "server" application, and a TIdCmdTcpClient in another "client" application. I know how to get the IP address of the Client once it has connected. What I don't know is how to distinguish between 2 clients that connect from the same ip address. Can anyone help?


Solution

  • This isn't really an Indy question, more a general networking one.

    Different clients at the same address must use distinct ports. And here I mean the port at the client end of the connection. So you distinguish between different clients at the same address by dint of them using different ports.