Winsock2 multiple threads multiple UDP sockets
Can I know that whether i can use multiple threads to send data through multiple udp sockets to the far side? I mean each threads has its own udp socket and independent from each others. In the receiving site, is it possible to use multiple threads to receive data from multiple udp sockets with each threads handles one independent udp socket? I am using winsock2.
as I am doing the multiple video streaming. A pair of udp sockets form the transmission link for 1 stream.
If the source machine and destination machine is the same, what are you attempting to gain by using multiple sockets? There is only a single network card, and a single network wire, between the two machines.
In general, though, yes, you can use different sockets from different threads. One thread per request generally scales poorly, though, when you get into thousands or tens of thousands of connections.
In general, though, yes, you can use different sockets from different threads. One thread per request generally scales poorly, though, when you get into thousands or tens of thousands of connections.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement