当前位置:网站首页>Network related encapsulation introduced by webrtc native M96 basic base module

Network related encapsulation introduced by webrtc native M96 basic base module

2022-06-25 11:46:00 Crossing the river with a reed 694

rtc_base IPAddress

Version independent IP Address class , Packaged in_addr and in6_addr Union .

Yes IP Encapsulation of address IPAddress and InterfaceAddress,IPAddress Reload the ==、!=、< and >、 Address support string(std::string ToString() const;)、sensitive_string(std::string ToSensitiveString() const;) and uint32_t(AF_INET)(int family() const) Type output , And support IPV4 turn IPV6 type (IPAddress AsIPv6Address() const;).InterfaceAddress yes IPAddress Subclasses of (class RTC_EXPORT InterfaceAddress : public IPAddress), Added IPv6 attribute (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
原网站

版权声明
本文为[Crossing the river with a reed 694]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206251143555461.html