Socket method advice?
-
Hi! I'm writing a program which needs to recieve a lot of data though a socket. Another application sends a lot of small portions (like 50 byte) of data (measurement data) to it over the network, like 1000 messages per second. Which socket communication is the best/fastest? Right now I testet a blocking CSocket in its own thread, but that really slows down the machine. But how should I do instead? Any tip? Should I use CAsyncSocket instead, and how? Blocking or non blocking? Thankful for any suggestion!!
-
Hi! I'm writing a program which needs to recieve a lot of data though a socket. Another application sends a lot of small portions (like 50 byte) of data (measurement data) to it over the network, like 1000 messages per second. Which socket communication is the best/fastest? Right now I testet a blocking CSocket in its own thread, but that really slows down the machine. But how should I do instead? Any tip? Should I use CAsyncSocket instead, and how? Blocking or non blocking? Thankful for any suggestion!!
You should easily be able to achieve 30,000(or more) messages per second, provided you have good hardware and a fast network connection, using IO Completion Ports and asynchronous sockets. See this article: http://msdn.microsoft.com/msdnmag/issues/1000/Winsock/[^]