How chriskohlhoff/asio works
Standalone Asio is a C++ asynchronous I/O and networking library. Its principal workflow is for an application to initiate asynchronous operations through public socket, resolver, timer, or file objects; an execution context schedules work and delivers completion handlers. The tree also shows coroutine and channel abstractions, SSL streams, and platform-specific I/O engines. The README is only a brief package notice and sampled implementation is limited, so several runtime relationships below are shown as dashed, unverified links rather than asserted call chains.
Main entry points: any_completion_handler.hpp Completion Handlers · basic_socket.hpp Socket APIs · asio.hpp Asio Umbrella · execution_context.hpp Execution Context
Components 20
Public I/O API
- Asio Umbrella
include/asio.hpp - I/O Objects
include/asio/basic_io_object.hpp - Socket APIs
include/asio/basic_socket.hpp - Timer APIs
include/asio/basic_waitable_timer.hpp - Files and Pipes
include/asio/basic_file.hpp - Buffer Sequences
include/asio/buffer.hpp
Async Programming
- Completion Handlers
include/asio/any_completion_handler.hpp - Coroutines
include/asio/awaitable.hpp - Cancellation
include/asio/associated_cancellation_slot.hpp - Executors
include/asio/execution.hpp
Networking
- Name Resolution
include/asio/ip/basic_resolver_query.hpp
Additional Facilities
- TLS Streams
include/asio/ssl/stream.hpp - Async Channels
include/asio/experimental/detail/channel_service.hpp
Runtime Internals
- Execution Context
include/asio/execution_context.hpp - Scheduler
include/asio/detail/scheduler.hpp - Platform I/O Engines
include/asio/detail/reactor.hpp - Core Primitives
include/asio/detail
Other components
- C++ Application
- Operating System
- OpenSSL
Connections 23
- C++ Application → Asio Umbrella: uses API
- Asio Umbrella → I/O Objects: includes
include/asio.hpp - Asio Umbrella → Socket APIs: includes
include/asio.hpp - C++ Application → Socket APIs: starts I/O
- C++ Application → Name Resolution: requests resolution
- C++ Application → Timer APIs: sets waits
- C++ Application → Files and Pipes: starts I/O
- Socket APIs → Buffer Sequences: transfers data
- Socket APIs → Completion Handlers: completes through
- Timer APIs → Completion Handlers: completes through
- Files and Pipes → Completion Handlers: completes through
- Completion Handlers → Executors: uses executor
- Coroutines → Completion Handlers: adapts completion
- Cancellation → Completion Handlers: associates cancellation
include/asio/any_completion_handler.hpp - I/O Objects → Execution Context: uses context
- Execution Context → Scheduler: dispatches work
include/asio/detail/scheduler.hpp - Scheduler → Platform I/O Engines: drives readiness
- Platform I/O Engines → Operating System: performs I/O
- Name Resolution → Operating System: resolves names
- TLS Streams → Socket APIs: wraps transport
- TLS Streams → OpenSSL: uses TLS engine
- Async Channels → Execution Context: registers service
include/asio/experimental/detail/channel_service.hpp - Core Primitives → Scheduler: supports scheduling
include/asio/detail/winrt_async_manager.hpp