xtd 0.2.0
multicast_option.h
Go to the documentation of this file.
1 #pragma once
5 #include "../ip_address.h"
6 #include "../../core_export.h"
7 #include "../../object.h"
8 #include "../../types.h"
9 #include "../../ustring.h"
10 
12 namespace xtd {
14  namespace net {
16  namespace sockets {
37  class core_export_ multicast_option : public xtd::object {
38  public:
40 
43  multicast_option() = default;
47  multicast_option(const xtd::net::ip_address& group, const xtd::net::ip_address& local_address);
50  explicit multicast_option(const xtd::net::ip_address& group);
55  multicast_option(const xtd::net::ip_address& group, uint32 interface_index);
57 
61  multicast_option& operator =(const multicast_option&) = default;
63 
65 
69  const xtd::net::ip_address& group() const noexcept;
73  multicast_option& group(const xtd::net::ip_address& value) noexcept;
74 
78  uint32 interface_index() const noexcept;
84  multicast_option& interface_index(uint32 value);
85 
88  const xtd::net::ip_address& local_address() const noexcept;
92  multicast_option& local_address(const xtd::net::ip_address& value) noexcept;
94 
95  private:
97  uint32 interface_index_ = 0;
99  };
100  }
101  }
102 }
Provides an Internet Protocol (IP) address.
Definition: ip_address.h:35
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains IPAddress values used to join and drop multicast groups.
Definition: multicast_option.h:37
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
static ip_address none
Provides an IP address that indicates that no network interface should be used. This field is constan...
Definition: ip_address.h:61
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239