Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
orbit::network Namespace Reference

Classes

class  ClientTlsContext
 
class  ConnectionPool
 
class  EpollProactor
 
class  IoUringProactor
 
struct  PooledConnection
 
class  Proactor
 
class  Socket
 
class  TlsContext
 Server TLS settings: certificates (with SNI) and ALPN. More...
 
class  UdpSocket
 

Typedefs

using socket_t = int
 
using socklen_t = ::socklen_t
 
using ssize_t = ::ssize_t
 

Functions

int get_last_socket_error ()
 
bool is_would_block_error ()
 
void initialize_platform_networking ()
 
void cleanup_platform_networking ()
 
void close_socket (socket_t fd)
 
void set_non_blocking (socket_t fd)
 
void shutdown_socket (socket_t fd)
 
std::string format_ip (const sockaddr *addr)
 
std::string peer_ip (socket_t fd)
 The connected peer's IP address (see format_ip), or "" if unknown.
 

Variables

constexpr socket_t INVALID_SOCKET_FD = -1
 
constexpr int SOCKET_ERROR_VAL = -1
 

Typedef Documentation

◆ socket_t

using orbit::network::socket_t = typedef int

◆ socklen_t

using orbit::network::socklen_t = typedef ::socklen_t

◆ ssize_t

using orbit::network::ssize_t = typedef ::ssize_t

Function Documentation

◆ cleanup_platform_networking()

void orbit::network::cleanup_platform_networking ( )

◆ close_socket()

void orbit::network::close_socket ( socket_t  fd)

◆ format_ip()

std::string orbit::network::format_ip ( const sockaddr *  addr)

Formats an IPv4 or IPv6 address; IPv4-mapped IPv6 addresses (::ffff:1.2.3.4, seen on dual-stack listeners) come back as plain IPv4. Returns "" for other families.

◆ get_last_socket_error()

int orbit::network::get_last_socket_error ( )
inline

◆ initialize_platform_networking()

void orbit::network::initialize_platform_networking ( )

◆ is_would_block_error()

bool orbit::network::is_would_block_error ( )
inline

◆ peer_ip()

std::string orbit::network::peer_ip ( socket_t  fd)

The connected peer's IP address (see format_ip), or "" if unknown.

◆ set_non_blocking()

void orbit::network::set_non_blocking ( socket_t  fd)

◆ shutdown_socket()

void orbit::network::shutdown_socket ( socket_t  fd)

Shuts down both directions: the peer sees end-of-stream at once and pending receives complete, even before the descriptor is closed.

Variable Documentation

◆ INVALID_SOCKET_FD

constexpr socket_t orbit::network::INVALID_SOCKET_FD = -1
constexpr

◆ SOCKET_ERROR_VAL

constexpr int orbit::network::SOCKET_ERROR_VAL = -1
constexpr