Boost - Asio - Network Programming
Boost - Asio - Network Programming
Boost - Asio - Network Programming
with Boost.Asio
What are the network I/O objects?
How are the network I/O objects used?
What are helper functions for async operations?
What are best practices?
ip::udp::resolver
ip::tcp::iostream
ip::udp::socket
ip::tcp::resolver
ip::icmp::resolver
ip::tcp::socket
ip::icmp::socket
ip::tcp::iostream
ip::tcp::resolver
ip::udp::resolver
ip::icmp::resolver
ip::tcp::socket
ip::udp::socket
ip::icmp::socket
Acceptor
Socket
Socket
Resolver
IOStream
Best Practices
Always check the error code in handlers
Use free-standing helper functions for
connecting, sending and receiving
Use io_service::post() to execute code in an
event loops thread
Use boost::enable_shared_from_this for
dynamically allocated objects whose member
functions are used for callbacks
More information
Boost.Asio documentation:
http://www.boost.org/libs/asio/
Boost.Asio examples:
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/examples.html
Online book:
http://en.highscore.de/cpp/boost/asio.html
http://www.highscore.de/cpp/boost/asio.html (German)
http://zh.highscore.de/cpp/boost/asio.html (Chinese)
10