Boost asio async vs blocking reads, udp speed/quality

Posted by Dolphin on Stack Overflow See other posts from Stack Overflow or by Dolphin
Published on 2009-07-27T14:47:43Z Indexed on 2010/04/10 9:03 UTC
Read the original article Hit count: 598

I have a quick and dirty proof of concept app that I wrote in C# that reads high data rate multicast UDP packets from the network. For various reasons the full implementation will be written in C++ and I am considering using boost asio. The C# version used a thread to receive the data using blocking reads. I had some problems with dropped packets if the computer was heavily loaded (generally with processing those packets in another thread).

What I would like to know is if the async read operations in boost (which use overlapped io in windows) will help ensure that I receive the packets and/or reduce the cpu time needed to receive the packets. The single thread doing blocking reads is pretty straightforward, using the async reads seems like a step up in complexity, but I think it would be worth it if it provided higher performance or dropped fewer packets on a heavily loaded system. Currently the data rate should be no higher than 60Mb/s.

© Stack Overflow or respective owner

Related posts about boost-asio

Related posts about overlapped-io