I have a question about UDP sockets..
I have used TCP lots of times, and when I need to create a multi-client server, I create a Client class, and call a Receive function which calls "recv" using its socket number.. So I can easily read data that related to this client from socket..
But now, I want to use UDP..
in UDP, there is no socket numbers as in TCP.. I use recvfrom and it gives me a address.. How can I bind an address to a Client (a pointer)..
When a data received, how can I know whose data is this?
Do I have to create a table like hashtable? Or is there any methods that commonly used to handle hundreds of client ?
Edited by FreOzgur, 07 December 2012 - 05:47 PM.