Template base class implementing asynchronous socket I/O operations. More...
#include <socket.hpp>
Template base class implementing asynchronous socket I/O operations.
This class extends the internal TSocketBase<void> by implementing asynchronous operations based on a type-specific socket operations trait, TSockOps. The TSockOps type must implement the following static methods:
static int TSockOps::read(int fd, void* buf, size_t size)
static int TSockOps::write(int fd, const void* buf, size_t size)
static int TSockOps::close(int fd)
It provides awaitable methods for reading and writing:
Both variants such as TSocket and TFileHandle (or similarly named higher-level wrappers) inherit from this class and expose the more user-friendly API. End users should use these derived classes, rather than interacting with TSocketBase<TSockOps> directly.
TSockOps | The type that provides low-level socket operations. |