xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
ip_v6_multicast_option.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include "../../core_export.h"
7 #include "../../object.h"
8 #include "../../types.h"
9 #include "../../ustring.h"
10 #include "../ip_address.h"
11 
13 namespace xtd {
15  namespace net {
17  namespace sockets {
25  public:
34  ip_v6_multicast_option(const xtd::net::ip_address& group, uint32_t interface_index);
35 
39  ip_v6_multicast_option& operator=(const ip_v6_multicast_option&) = default;
40  friend std::ostream& operator <<(std::ostream& os, const ip_v6_multicast_option& mo) noexcept {return os << mo.to_string();}
42 
45  const xtd::net::ip_address& group() const noexcept;
49  ip_v6_multicast_option& group(const xtd::net::ip_address& value) noexcept;
50 
54  uint32_t interface_index() const noexcept;
59  ip_v6_multicast_option& interface_index(uint32_t value) noexcept;
60 
61  private:
62  xtd::net::ip_address group_ = xtd::net::ip_address::ip_v6_none;
63  uint32_t interface_index_ = 0;
64  };
65  }
66  }
67 }
Provides an Internet Protocol (IP) address.
Definition: ip_address.h:30
Contains option values for joining an IPv6 multicast group.
Definition: ip_v6_multicast_option.h:24
const xtd::net::ip_address & group() const noexcept
Gets the IP address of a multicast group.
ip_v6_multicast_option()=default
Initializes a new instance of the xtd::net::sockets::ip_v6_multicast_option class.
ip_v6_multicast_option(const xtd::net::ip_address &group)
Initializes a new version of the xtd::net::sockets::ip_v6_multicast_option class for the specified IP...
ip_v6_multicast_option(const xtd::net::ip_address &group, uint32_t interface_index)
Initializes a new instance of the xtd::net::sockets::ip_v6_multicast_option class with the specified ...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
virtual xtd::ustring to_string() const noexcept
Returns a std::string that represents the current object.
#define core_export_
Define shared library export.
Definition: core_export.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17