Skip to content
All library documents

Choosing C++ Networking Libraries for Low-Latency Trading

Article Quant Q&A · Author: Joe Patrick

Summary

The document compares options for asynchronous, non-blocking TCP and UDP networking in C++, framed around low-latency and real-time development. It notes that standard networking support was expected in C++17 and presents Boost as a way to abstract operating-system facilities such as epoll, kqueue, and I/O completion mechanisms. For applications seeking lower latency, it points to DPDK, which bypasses the operating-system kernel.

Other replies suggest POCO and ACE as networking libraries, with ACE described as having concepts similar to Java NIO but potentially being difficult to learn. These are recommendations from individual respondents, not a benchmark or systematic comparison. The discussion does not establish which option is fastest or most widely used, and the C++ standardization claim reflects the period of the original exchange. Selection therefore depends on the application's needs and the developer's willingness to work with platform-specific tools.

Key ideas

  • Boost can abstract operating-system asynchronous I/O mechanisms for C++ networking.
  • DPDK is suggested for latency-sensitive applications that can bypass the operating-system kernel.
  • POCO and ACE are offered as alternative networking libraries.
  • The discussion provides personal recommendations, not comparative performance measurements.

Tags

Full text
# What is the best / most used / recommended C++ non-blocking networking library for low-latency / real-time development?


# What is the best / most used / recommended C++ non-blocking networking library for low-latency / real-time development?












I'm coming from Java and there we use the EPoll selector implementation that comes with the JDK for non-blocking / asynchronous networking TCP and UDP development. Therefore you don't have to make choices.

But when it comes to C++ there are dozens of options to choose from according to this answer: https://stackoverflow.com/questions/118945/best-c-c-network-library

I don't have experience with C++ so I don't know. Which one should I pick for low-latency, asynchronous, non-blocking, real-time, selector style network programming? Does C++ even have a standard non-blocking network library or are they all external / independent?

## Answer by Clebson Derivan (score 3)

https://quant.stackexchange.com/a/25150

networking will be available as standard only in c++17, currently boost is an option if you want to abstract the operational system features ( epool, kqueue, io completion ), low latency or realtime try dpdk to bypass operational system kernel.

## Answer by rimas (score 3)

https://quant.stackexchange.com/a/25793

Take a look on POCO. This is really good library.

Another link I consider you should to check is ACE. You may find it a bit outdated and hard to understand from first try but concept is very close to MINA and NIO.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.