Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
sese::net::IPAddress类 参考abstract

IP 地址类 更多...

#include <IPAddress.h>

类 sese::net::IPAddress 继承关系图:
sese::net::Address sese::net::IPv4Address sese::net::IPv6Address

Public 类型

using Ptr = std::shared_ptr<IPAddress>
 
- Public 类型 继承自 sese::net::Address
using Ptr = std::shared_ptr<Address>
 

Public 成员函数

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 成员函数 继承自 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
 

静态 Public 成员函数

static Ptr create (const char *address, uint16_t port=0)
 
- 静态 Public 成员函数 继承自 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)
 

详细描述

IP 地址类

成员类型定义说明

◆ Ptr

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

成员函数说明

◆ 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

sese::net::IPv4Address , 以及 sese::net::IPv6Address 内被实现.

◆ getFamily()

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

◆ getNetworkAddress()

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

sese::net::IPv4Address , 以及 sese::net::IPv6Address 内被实现.

◆ getPort()

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

sese::net::IPv4Address , 以及 sese::net::IPv6Address 内被实现.

◆ getSubnetMask()

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

sese::net::IPv4Address , 以及 sese::net::IPv6Address 内被实现.

◆ setFamily()

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

sese::net::IPv4Address , 以及 sese::net::IPv6Address 内被实现.

◆ setPort()

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

sese::net::IPv4Address , 以及 sese::net::IPv6Address 内被实现.

被这些函数引用 create().


该类的文档由以下文件生成: