From aa29f7c3c99ef977aa7a78a502944623ae6c1ac0 Mon Sep 17 00:00:00 2001 From: aazainjan Date: Wed, 26 Aug 2026 10:09:54 +0500 Subject: [PATCH] docs: document asynchronous networking --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d31c761..c77060d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,27 @@ this version!), and `pthreads` (you need to link with `lpthread`) and OpenSSL There are some examples for all socket/connection types in the `examples` directory. ## Asyncronous functionality: -*TODO Describe the design of the asynchronous system* + +Socketwrapper provides three interfaces for asynchronous network operations: + +### Callback-based operations + +The `async_*` methods return immediately and invoke a callback when the +operation completes. These methods are available for TCP, UDP, and TCP +acceptors. + +Examples include: + +- `tcp_connection::async_read()` +- `tcp_connection::async_send()` +- `tcp_acceptor::async_accept()` +- `udp_socket::async_read()` +- `udp_socket::async_send()` + +The asynchronous context can be processed with: + +```cpp +net::async_run(); ## Class Documentation: All of the following classes and enum classes live in the namespace `net`.