Winsocks(Connections/Per Port)

Started by
0 comments, last by Antheus 16 years, 11 months ago
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.
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.

This topic is closed to new replies.

Advertisement