Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Boost.Asio C++ Network Programming
Table of Contents
Boost.Asio C++ Network Programming
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Boost.Asio
What is Boost.Asio?
History
Dependencies
Building Boost.Asio
Important macros
Synchronous versus asynchronous
Exceptions versus error codes
Threading in Boost.Asio
Not just networking
Timers
The io_service class
Summary
2. Boost.Asio Fundamentals
The Network API
Boost.Asio namespaces
IP addresses
Endpoints
Sockets
Synchronous error codes
Socket member functions
Connecting-related functions
Read/write functions
Socket control
TCP versus UDP versus ICMP
Miscellaneous functions
Other considerations
Socket buffers
The buffer function wrapper
The read/write/connect free functions
The connect functions
The read/write functions
The read_until/async_read_until functions
The *_at functions
Asynchronous programming
The need for going asynchronous
Asynchronous run(), run_one(), poll(), poll_one()
Running forever
The run_one(), poll(), poll_one() functions
Asynchronous work
Asynchronous post() versus dispatch() versus wrap()
Staying alive
Summary
3. Echo Server/Clients
TCP Echo server/clients
TCP synchronous client
TCP synchronous server
TCP asynchronous client
TCP asynchronous server
The code
UDP Echo server/clients
UDP synchronous Echo client
UDP synchronous Echo server
Summary
4. Client and Server
The synchronous client/server
Synchronous client
Synchronous server
The asynchronous client/server
Asynchronous client
Asynchronous server
Summary
5. Synchronous Versus Asynchronous
Mixing synchronous and asynchronous programming
Passing client to server messages and vice versa
Synchronous I/O in client applications
Synchronous I/O in server applications
Threading in a synchronous server
Asynchronous I/O in client applications
Asynchronous I/O in server applications
Threading in an asynchronous server
Asynchronous operations
Implementing proxies
Summary
6. Boost.Asio – Other Features
std streams and std buffer I/O
Boost.Asio and the STL streams
The streambuf class
The free functions that deal with streambuf objects
Co-routines
Summary
7. Boost.Asio – Advanced Topics
Asio versus Boost.Asio
Debugging
Handler tracking information
An example
Handler tracking to file
SSL
Boost.Asio Windows features
Stream Handles
Random access Handles
Object Handles
Boost.Asio POSIX features
Local sockets
Connecting local sockets
POSIX file descriptors
Fork
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →