January 16th, 2013, 03:21 PM
Identify a client in a UDP server
I'm new to UDP so please correct me if I'm wrong.
A UDP server doesn't use client SOCKET's (which are unique to every client) in order to receive or send information, but a sockaddr structure (that can be casted to a sockaddr_in structure), so how do I identify each client by that structure?
I thought about using the sin_addr data member (which is the IP address of the client) of sockaddr_in, but then I realized that it's possible to have more than one clients who use the same IP address.
How do I get a unique identifier (such as SOCKET for TCP connections) for each client?
This is in <winsock2.h> by the way.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!