What is Boost.Asio
Boost.Asio (asynchronous input / output) library intended for programmers using C++ for system programming, where access to operating system functions is often required, for example, to the network.
The library is portable, runs on most operating systems and scales well with more than a thousand simultaneous connections. The network part was a follower of BSD (Berkeley Software Distribution) sockets. Provides API for working with TCP (Transmission Control Protocol) sockets, UDP (User Datagram Protocol) sockets, ICMP (Internet Control Message Protocol) sockets, and the library is extensible.
Features of Boost.Asio
The main features of Boost.Asio:
- the ability to write cross-platform network code (Windows, almost all Unix-like OS)
- support for both IPv4 and IPv6
- work with TCP & UDP
- support of execution of asynchronous operations
- the ability to use interfaces that are compatible with std::iostream
- SSL support
- support for pending operations (timers)
Advantages of Boost.Asio:
- high code portability
- each platform is implemented the most effective strategy of work
- epoll in Linux 2.6
- kqueue in FreeBSD/MacOSX
- Overlapped IO in MS Windows
- synchronous and asynchronous operation with sockets
- use streamed I/O compatible with std::iostream.
How to use Boost.Asio
Boost.Asio is used in many projects, such as:
- Remobo, allows you to create your own IPN (Instant Payment Notification)
- libtorrent, is a library that implements the Bittorrent client
- PokerTH, is a poker game with support for LAN and Internet
Boost.Asio successfully abstracts the concepts of input and output, which work not only for networking, but also for serial COM ports, files, and so on. In addition, you can make input or output programming synchronous or asynchronous
In the Credits platform the Boost.Asio library is actively used in the development of the Credits platform. For example, when implementing consensus and launching rounds.