### C++11 Examples

##### Allocation

This example shows how to customise the allocation of memory associated with asynchronous operations.

- ../src/examples/cpp11/allocation/server.cpp (diff to C++03)

##### Buffers

This example demonstrates how to create reference counted buffers that can be used with socket read and write operations.

- ../src/examples/cpp11/buffers/reference_counted.cpp (diff to C++03)

##### Chat

This example implements a chat server and client. The programs use a custom protocol with a fixed length message header and variable length message body.

- ../src/examples/cpp11/chat/chat_message.hpp (diff to C++03)
- ../src/examples/cpp11/chat/chat_client.cpp (diff to C++03)
- ../src/examples/cpp11/chat/chat_server.cpp (diff to C++03)

##### Echo

A collection of simple clients and servers, showing the use of both synchronous and asynchronous operations.

- ../src/examples/cpp11/echo/async_tcp_echo_server.cpp (diff to C++03)
- ../src/examples/cpp11/echo/async_udp_echo_server.cpp (diff to C++03)
- ../src/examples/cpp11/echo/blocking_tcp_echo_client.cpp (diff to C++03)
- ../src/examples/cpp11/echo/blocking_tcp_echo_server.cpp (diff to C++03)
- ../src/examples/cpp11/echo/blocking_udp_echo_client.cpp (diff to C++03)
- ../src/examples/cpp11/echo/blocking_udp_echo_server.cpp (diff to C++03)

##### Futures

This example demonstrates how to use std::future in conjunction with Asio's asynchronous operations.

- ../src/examples/cpp11/futures/daytime_client.cpp

##### HTTP Server

This example illustrates the use of asio in a simple single-threaded server implementation of HTTP 1.0. It demonstrates how to perform a clean shutdown by cancelling all outstanding asynchronous operations.

- ../src/examples/cpp11/http/server/connection.cpp (diff to C++03)
- ../src/examples/cpp11/http/server/connection.hpp (diff to C++03)
- ../src/examples/cpp11/http/server/connection_manager.cpp (diff to C++03)
- ../src/examples/cpp11/http/server/connection_manager.hpp (diff to C++03)
- ../src/examples/cpp11/http/server/header.hpp (diff to C++03)
- ../src/examples/cpp11/http/server/main.cpp (diff to C++03)
- ../src/examples/cpp11/http/server/mime_types.cpp (diff to C++03)
- ../src/examples/cpp11/http/server/mime_types.hpp (diff to C++03)
- ../src/examples/cpp11/http/server/reply.cpp (diff to C++03)
- ../src/examples/cpp11/http/server/reply.hpp (diff to C++03)
- ../src/examples/cpp11/http/server/request.hpp (diff to C++03)
- ../src/examples/cpp11/http/server/request_handler.cpp (diff to C++03)
- ../src/examples/cpp11/http/server/request_handler.hpp (diff to C++03)
- ../src/examples/cpp11/http/server/request_parser.cpp (diff to C++03)
- ../src/examples/cpp11/http/server/request_parser.hpp (diff to C++03)
- ../src/examples/cpp11/http/server/server.cpp (diff to C++03)
- ../src/examples/cpp11/http/server/server.hpp (diff to C++03)

##### Spawn

Example of using the asio::spawn() function, a wrapper around the Boost.Coroutine library, to implement a chain of asynchronous operations using stackful coroutines.

- ../src/examples/cpp11/spawn/echo_server.cpp (diff to C++03)