当前位置:网站首页>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边栏推荐
- 现在网上炒股开户身份证信息安全吗?
- Comment TCP gère - t - il les exceptions lors de trois poignées de main et de quatre vagues?
- 云原生数据湖以存储、计算、数据管理等能力通过信通院评测认证
- Is industrial securities a state-owned enterprise? Is it safe to open an account in industrial securities?
- A program reflecting the characteristics of C language program structure
- ThingsPanel 发布物联网手机客户端(多图)
- TCP如何處理三次握手和四次揮手期間的异常
- CMU提出NLP新范式—重构预训练,高考英语交出134高分
- 交易期货沪镍产品网上怎么开户
- Capacity expansion mechanism of Dict Of redis (rehash)
猜你喜欢

Sentinel integrated Nacos data source

Evaluating the overall situation of each class in a university based on entropy weight method (formula explanation + simple tool introduction)

How TCP handles exceptions during three handshakes and four waves

Countdownlatch source code analysis

按钮多次点击造成结果

An interesting logic SRC mining

金太阳教育美股上市:市值3.6亿美元 成小盘中概股

记一次给OpenHarmony提交代码的过程

Niuke.com: host scheduling

牛客网:旋转数组
随机推荐
Share 7 immortal wallpaper websites, let the new wallpaper give you a little joy, and don't fall into the repetition year after year.
记一次有趣的逻辑SRC挖掘
.Net Core 中使用工厂模式
JS judge whether a number is in the set
CFCA安心签接入
Redis6 note02 configuration file, publish and subscribe, new data type, jedis operation
Yisheng biological sprint scientific innovation board: 25% of the revenue comes from the sales of new crown products, and it is planned to raise 1.1 billion yuan
Is it safe to open a stock account on your mobile phone? Who can I open an account with?
Big endian and little endian
How to use the markdown editor
Jincang database kingbasees plug-in identity_ pwdexp
C disk uses 100% cleaning method
Flink deeply understands the graph generation process (source code interpretation)
Manually rollback abnormal data
CMU puts forward a new NLP paradigm - reconstructing pre training, and achieving 134 high scores in college entrance examination English
Hangzhou / Beijing neitui Ali Dharma academy recruits academic interns in visual generation (talent plan)
金太阳教育美股上市:市值3.6亿美元 成小盘中概股
Spark history server and event log details
Vulnérabilité à l'injection SQL (contournement)
按钮多次点击造成结果