HTTP Client
Example programs implementing simple HTTP 1.0 clients. These examples show how to use the read_until and async_read_until functions.
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.
- boost_asio/example/http/server/connection.cpp
- boost_asio/example/http/server/connection.hpp
- boost_asio/example/http/server/connection_manager.cpp
- boost_asio/example/http/server/connection_manager.hpp
- boost_asio/example/http/server/header.hpp
- boost_asio/example/http/server/main.cpp
- boost_asio/example/http/server/mime_types.cpp
- boost_asio/example/http/server/mime_types.hpp
- boost_asio/example/http/server/reply.cpp
- boost_asio/example/http/server/reply.hpp
- boost_asio/example/http/server/request.hpp
- boost_asio/example/http/server/request_handler.cpp
- boost_asio/example/http/server/request_handler.hpp
- boost_asio/example/http/server/request_parser.cpp
- boost_asio/example/http/server/request_parser.hpp
- boost_asio/example/http/server/server.cpp
- boost_asio/example/http/server/server.hpp
HTTP Server 2
An HTTP server using an io_service-per-CPU design.
- boost_asio/example/http/server2/connection.cpp
- boost_asio/example/http/server2/connection.hpp
- boost_asio/example/http/server2/header.hpp
- boost_asio/example/http/server2/io_service_pool.cpp
- boost_asio/example/http/server2/io_service_pool.hpp
- boost_asio/example/http/server2/main.cpp
- boost_asio/example/http/server2/mime_types.cpp
- boost_asio/example/http/server2/mime_types.hpp
- boost_asio/example/http/server2/reply.cpp
- boost_asio/example/http/server2/reply.hpp
- boost_asio/example/http/server2/request.hpp
- boost_asio/example/http/server2/request_handler.cpp
- boost_asio/example/http/server2/request_handler.hpp
- boost_asio/example/http/server2/request_parser.cpp
- boost_asio/example/http/server2/request_parser.hpp
- boost_asio/example/http/server2/server.cpp
- boost_asio/example/http/server2/server.hpp
HTTP Server 3
An HTTP server using a single io_service and a thread pool calling
io_service::run()
.
- boost_asio/example/http/server3/connection.cpp
- boost_asio/example/http/server3/connection.hpp
- boost_asio/example/http/server3/header.hpp
- boost_asio/example/http/server3/main.cpp
- boost_asio/example/http/server3/mime_types.cpp
- boost_asio/example/http/server3/mime_types.hpp
- boost_asio/example/http/server3/reply.cpp
- boost_asio/example/http/server3/reply.hpp
- boost_asio/example/http/server3/request.hpp
- boost_asio/example/http/server3/request_handler.cpp
- boost_asio/example/http/server3/request_handler.hpp
- boost_asio/example/http/server3/request_parser.cpp
- boost_asio/example/http/server3/request_parser.hpp
- boost_asio/example/http/server3/server.cpp
- boost_asio/example/http/server3/server.hpp
HTTP Server 4
A single-threaded HTTP server implemented using stackless coroutines.
- boost_asio/example/http/server4/coroutine.hpp
- boost_asio/example/http/server4/file_handler.cpp
- boost_asio/example/http/server4/file_handler.hpp
- boost_asio/example/http/server4/header.hpp
- boost_asio/example/http/server4/main.cpp
- boost_asio/example/http/server4/mime_types.cpp
- boost_asio/example/http/server4/mime_types.hpp
- boost_asio/example/http/server4/reply.cpp
- boost_asio/example/http/server4/reply.hpp
- boost_asio/example/http/server4/request.hpp
- boost_asio/example/http/server4/request_parser.cpp
- boost_asio/example/http/server4/request_parser.hpp
- boost_asio/example/http/server4/server.cpp
- boost_asio/example/http/server4/server.hpp
- boost_asio/example/http/server4/unyield.hpp
- boost_asio/example/http/server4/yield.hpp