Jump to content
  • Advertisement
Sign in to follow this  
hamik112

Winsocks(Connections/Per Port)

This topic is 4082 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

Well I read somewhere that for each port you can have only one connection in winsocks? Is true If so how would you get around this because I don't want to create a port for each connection. I googled it and I couldn't really find anything. If someone could link me to an article or explain I would be very thankful.

Share this post


Link to post
Share on other sites
Advertisement
Each socket can only be bound to single port for that given protocol (TCP/UDP).

When TCP server receives connection request, you call accept method, and a new socket is created, through which the server will then be communicating. Port binding here is automatic and of no concern to you, it's part of TCP layer.

When client requests a connection to the server, its port will be automatically allocated as well.

UDP doesn't use connections, so server will be listening on single post via single socket and handle all communication through there.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!