Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::net::IPAddress Class Referenceabstract

IP address class. More...

#include <IPAddress.h>

Inheritance diagram for sese::net::IPAddress:
sese::net::Address sese::net::IPv4Address sese::net::IPv6Address

Public Types

using Ptr = std::shared_ptr<IPAddress>
 
- Public Types inherited from sese::net::Address
using Ptr = std::shared_ptr<Address>
 

Public Member Functions

virtual Ptr getBroadcastAddress (uint32_t prefix_len) const noexcept=0
 
virtual Ptr getNetworkAddress (uint32_t prefix_len) const noexcept=0
 
virtual Ptr getSubnetMask (uint32_t prefix_len) const noexcept=0
 
virtual void setPort (uint16_t port) noexcept=0
 
virtual uint16_t getPort () const noexcept=0
 
virtual void setFamily (uint16_t family) noexcept=0
 
virtual uint16_t getFamily () noexcept=0
 
- Public Member Functions inherited from sese::net::Address
virtual ~Address ()=default
 
virtual sockaddr * getRawAddress () const noexcept=0
 
virtual socklen_t getRawAddressLength () const noexcept=0
 
virtual std::string getAddress () const noexcept=0
 

Static Public Member Functions

static Ptr create (const char *address, uint16_t port=0)
 
- Static Public Member Functions inherited from sese::net::Address
static Ptr create (const sockaddr *address, socklen_t address_len)
 
static bool lookUp (std::vector< Address::Ptr > &result, const std::string &host, int family=AF_INET, int type=0, int protocol=0)
 
static Address::Ptr lookUpAny (const std::string &host, int family=AF_INET, int type=0, int protocol=0)
 

Detailed Description

IP address class.

Member Typedef Documentation

◆ Ptr

using sese::net::IPAddress::Ptr = std::shared_ptr<IPAddress>

Member Function Documentation

◆ create()

IPAddress::Ptr IPAddress::create ( const char * address,
uint16_t port = 0 )
static

◆ getBroadcastAddress()

virtual Ptr sese::net::IPAddress::getBroadcastAddress ( uint32_t prefix_len) const
nodiscardpure virtualnoexcept

◆ getFamily()

virtual uint16_t sese::net::IPAddress::getFamily ( )
nodiscardpure virtualnoexcept

◆ getNetworkAddress()

virtual Ptr sese::net::IPAddress::getNetworkAddress ( uint32_t prefix_len) const
nodiscardpure virtualnoexcept

◆ getPort()

virtual uint16_t sese::net::IPAddress::getPort ( ) const
nodiscardpure virtualnoexcept

◆ getSubnetMask()

virtual Ptr sese::net::IPAddress::getSubnetMask ( uint32_t prefix_len) const
nodiscardpure virtualnoexcept

◆ setFamily()

virtual void sese::net::IPAddress::setFamily ( uint16_t family)
pure virtualnoexcept

◆ setPort()

virtual void sese::net::IPAddress::setPort ( uint16_t port)
pure virtualnoexcept

Implemented in sese::net::IPv4Address, and sese::net::IPv6Address.

Referenced by create().


The documentation for this class was generated from the following files: