AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
anch::network Namespace Reference

Network namespace. More...

Classes

class  Address
 Socket address (IPv4 or IPv6 address and port). More...
class  IOException
 Network input/output error. More...
class  Socket
 Network socket (POSIX). More...
struct  SocketHolder
 Socket owner base class of TcpStream. More...
class  TcpServer
 TCP server: accept connections as TcpStream. More...
class  TcpStream
 TCP connection as a std::iostream. More...
class  UdpSocket
 UDP socket. More...

Enumerations

enum class  SocketType { TCP = SOCK_STREAM , UDP = SOCK_DGRAM }
enum class  Direction { RECEPTION = SHUT_RD , TRANSMISSION = SHUT_WR , BOTH = SHUT_RDWR }

Functions

const std::error_category & addrinfoCategory () noexcept

Detailed Description

Network namespace.

Network sockets as C++ streams (POSIX only, IPv4 and IPv6):

Errors are reported with anch::network::IOException (a std::system_error with the errno value).

Enumeration Type Documentation

◆ Direction

enum class anch::network::Direction
strong

Socket direction (for Socket::shutdown )

Enumerator
RECEPTION 

Reception

TRANSMISSION 

Transmission

BOTH 

Reception and transmission

◆ SocketType

enum class anch::network::SocketType
strong

Socket type

Enumerator
TCP 

TCP socket (SOCK_STREAM )

UDP 

UDP socket (SOCK_DGRAM )

Function Documentation

◆ addrinfoCategory()

const std::error_category & anch::network::addrinfoCategory ( )
noexcept

getaddrinfo error category (messages from gai_strerror )

Returns
the category
Since
0.2
Here is the call graph for this function: