Quote Originally Posted by techomange
UDP is connection less so there is no way of knowin g when a UDP client is no longer sending data. Only with TCP can you detect droped connections etc.

Getting the remote UDP port is trickly in most netowrk libraries (I know it's a pain in SDL_Net) I always got round this by sending on a known port but firewalls don't always make that easy, or send the port to send info back on to the server in the first "handshake" mesages.

Some thing else I do is to use TCP to connect to the server and login, then use UDP for all the time critical information. Taht way if the TCP connections drops you can handle that and remove that client from the UDP client list as well.
I do the same thing with TCP, and for UDP ports of clients (the client sends their port via TCP). Plus if the client cant use UDP for some reason, it reroutes traffic to TCP.

Indy doesnt fully detect TCP disconnects (thats what i meant at first). Even if you ask it "TCPClient.Connected" it can return true while the connected has been broken or timed out. I purchased an Indy support package (recommended) and they told me that we have to send keep alives and queries to verify TCP connection.