| Home | Libraries | People | FAQ | More

## Tutorial

#### Basic Skills

The tutorial programs in this first section introduce the fundamental concepts required to use the asio toolkit. Before plunging into the complex world of network programming, these tutorial programs illustrate the basic skills using simple asynchronous timers.

- Timer.1 - Using a timer synchronously
- Timer.2 - Using a timer asynchronously
- Timer.3 - Binding arguments to a handler
- Timer.4 - Using a member function as a handler
- Timer.5 - Synchronising handlers in multithreaded programs

#### Introduction to Sockets

The tutorial programs in this section show how to use asio to develop simple client and server programs. These tutorial programs are based around the daytime protocol, which supports both TCP and UDP.

The first three tutorial programs implement the daytime protocol using TCP.

- Daytime.1 - A synchronous TCP daytime client
- Daytime.2 - A synchronous TCP daytime server
- Daytime.3 - An asynchronous TCP daytime server

The next three tutorial programs implement the daytime protocol using UDP.

- Daytime.4 - A synchronous UDP daytime client
- Daytime.5 - A synchronous UDP daytime server
- Daytime.6 - An asynchronous UDP daytime server

The last tutorial program in this section demonstrates how asio allows the TCP and UDP servers to be easily combined into a single program.

- Daytime.7 - A combined TCP/UDP asynchronous server