Determine Internet IP from Socket :: Winsock
Hi.
Given an active socket, what is the best way to determine the IP property of that socket?
For example, let say I have an ftp server. When a connection is made with a client and the socket for that client is active, how do you determine the client''s IP address?
My initial idea right now is to us getpeername(), which returns the socket''s sockaddr. Once you have a pointer to a sockaddr structure, you then determine the IP using getnameinfo().
Thanks,
Kuphryn
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement