Can someone give me an example on how to listen on multiple ports with Winsock? I have been trying for hours with no luck..
osean
0
Newbie Poster
Recommended Answers
Jump to PostI haven't done it, but I dont think that it should be much different than listening in a single port...Just create SocketNumber1 and bind it to portnumber1, create SocketNumber2 and bind it to portnumber2, and listen on both sockets. Depending on the Socket I/O Model, you will get which request …
Jump to Post>it would be nice if i could just use one socket for listening on several ports.
Too bad it doesn't work that way. You have to have multiple sockets to listen on multiple ports, whether it be something like an array of sockets in the thread, or multiple threads that …
All 5 Replies
WolfPack
491
Posting Virtuoso
Team Colleague
osean
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
WolfPack
491
Posting Virtuoso
Team Colleague
osean
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.