当前位置:网站首页>WebRTC Native M96 基础Base模块介绍之网络相关的封装
WebRTC Native M96 基础Base模块介绍之网络相关的封装
2022-06-25 11:44:00 【一苇渡江694】
rtc_base IPAddress
与版本无关的 IP 地址类,包装了 in_addr 和 in6_addr 的联合。
对IP地址的封装IPAddress和InterfaceAddress,IPAddress重载了==、!=、<和>、地址支持string(std::string ToString() const;
)、sensitive_string(std::string ToSensitiveString() const;
)和uint32_t(AF_INET)(int family() const
)类型输出,还支持IPV4转IPV6类型(IPAddress AsIPv6Address() const;
)。InterfaceAddress是IPAddress的子类(class RTC_EXPORT InterfaceAddress : public IPAddress
),增加了IPv6属性(int ipv6_flags_;
)
class RTC_EXPORT IPAddress {
public:
IPAddress() : family_(AF_UNSPEC) { ::memset(&u_, 0, sizeof(u_)); }
explicit IPAddress(const in_addr& ip4) : family_(AF_INET) {
memset(&u_, 0, sizeof(u_));
u_.ip4 = ip4;
}
explicit IPAddress(const in6_addr& ip6) : family_(AF_INET6) { u_.ip6 = ip6; }
explicit IPAddress(uint32_t ip_in_host_byte_order) : f
边栏推荐
- Eureka accesses the console and reports an error: whitelabel error page
- 文献之有效阅读
- Translation of meisai C topic in 2022 + sharing of ideas
- 9 cases where elements cannot be located
- Capacity expansion mechanism of Dict Of redis (rehash)
- 2022 mathematical modeling competition time and registration fee
- Explain websocket protocol in detail
- Introduction to JVM principle
- Tool usage summary
- Double buffer transparent encryption and decryption driven course paper + project source code based on minifilter framework
猜你喜欢
ThingsPanel 發布物聯網手機客戶端(多圖)
Redis6笔记02 配置文件,发布和订阅,新数据类型,Jedis操作
为什么要分布式 id ?分布式 id 生成方案有哪些?
SQL injection vulnerability (bypass)
Research on parallel computing architecture of meteorological early warning based on supercomputing platform
SystemVerilog (XIII) - enumerate data types
翌圣生物冲刺科创板:25%收入来自新冠产品销售 拟募资11亿
Spark history server and event log details
CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
SQL注入漏洞(绕过篇)
随机推荐
CFCA Anxin sign access
Capacity expansion mechanism of Dict Of redis (rehash)
Arrays.asList()
芯片的发展史和具体用途以及结构是什么样的
Bayes
Customize to prevent repeated submission of annotations (using redis)
Simple use of stream
Builder pattern
数据库系列:MySQL索引优化总结(综合版)
Detailed explanation of spark specification
Kingbasees plug-in ftutilx of Jincang database
建造者模式
Idea uses the fast request interface for debugging
基于Minifilter框架的双缓冲透明加解密驱动 课程论文+项目源码
Causes and solutions of over fitting
A program reflecting the characteristics of C language program structure
Double tampon transparent cryptage et décryptage basé sur le cadre minifilter
9 cases where elements cannot be located
Jincang database kingbasees plug-in identity_ pwdexp
Very important very important very important very important very important very important very important very important very important