Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::net Namespace Reference

Namespaces

namespace  dns
 
namespace  http
 
namespace  ws
 

Classes

class  Address
 Address class. More...
 
class  AddressPool
 IP address pool. More...
 
class  IPAddress
 IP address class. More...
 
class  IPv4Address
 IPv4 address class. More...
 
class  IPv6Address
 IPv6 address class. More...
 
class  ReusableSocket
 Reusable socket builder for address and port. More...
 
class  Socket
 Native Socket class. More...
 

Typedefs

using IPv4AddressPool = AddressPool<sese::net::IPv4Address>
 
using IPv6AddressPool = AddressPool<sese::net::IPv6Address>
 

Functions

template<typename T >
static T CreateMask (uint32_t bits)
 
int inetPton (int af, const char *src, void *dst) noexcept
 
uint16_t createRandomPort () noexcept
 
int getNetworkError () noexcept
 Get network-related error codes.
 
std::string getNetworkErrorString (int error=getNetworkError()) noexcept
 Get network-related error description.
 

Typedef Documentation

◆ IPv4AddressPool

◆ IPv6AddressPool

Function Documentation

◆ CreateMask()

◆ createRandomPort()

uint16_t sese::net::createRandomPort ( )
noexcept

Randomly select a port in the range (1024, 65535)

Returns
Random port

References sese::RandomUtil::next().

◆ getNetworkError()

◆ getNetworkErrorString()

std::string sese::net::getNetworkErrorString ( int error = getNetworkError())
noexcept

Get network-related error description.

Parameters
errorCode
Returns
Error description

References sese::getErrorString().

◆ inetPton()

int sese::net::inetPton ( int af,
const char * src,
void * dst )
noexcept