🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
multiconnection server
How would you allow more than 1 connection on a server using winsock?
I thought maybe you create multiple sockets to all listen on the same port, is this right?
Thanks
Using TCP you:
socket()
bind()
listen()
accept()
send()
recv()
Using UDP you:
socket()
bind()
sendto()
recvfrom()
With UDP only one socket is needed, the sendtd and recvfrom calls take an extra argument that specifies the remote machine that is sending / receiving.
With TCP, when you call accept() you get back a new socket handle for the connection with the remote host.
socket()
bind()
listen()
accept()
send()
recv()
Using UDP you:
socket()
bind()
sendto()
recvfrom()
With UDP only one socket is needed, the sendtd and recvfrom calls take an extra argument that specifies the remote machine that is sending / receiving.
With TCP, when you call accept() you get back a new socket handle for the connection with the remote host.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement