Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Determine Internet IP from Socket :: Winsock

This topic is 5980 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!