xtd 0.2.0
Loading...
Searching...
No Matches
multicast_option.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../ip_address.hpp"
6#include "../../core_export.hpp"
7#include "../../object.hpp"
8#include "../../types.hpp"
9#include "../../string.hpp"
10
12namespace xtd {
14 namespace net {
16 namespace sockets {
40 public:
42
45 multicast_option() = default;
49 multicast_option(const xtd::net::ip_address& group, const xtd::net::ip_address& local_address);
52 explicit multicast_option(const xtd::net::ip_address& group);
57 multicast_option(const xtd::net::ip_address& group, uint32 interface_index);
59
63 multicast_option& operator =(const multicast_option&) = default;
65
67
71 const xtd::net::ip_address& group() const noexcept;
75 multicast_option& group(const xtd::net::ip_address& value) noexcept;
76
80 uint32 interface_index() const noexcept;
86 multicast_option& interface_index(uint32 value);
87
90 const xtd::net::ip_address& local_address() const noexcept;
94 multicast_option& local_address(const xtd::net::ip_address& value) noexcept;
96
97 private:
98 xtd::net::ip_address group_ = xtd::net::ip_address::none;
99 uint32 interface_index_ = 0;
100 xtd::net::ip_address local_address_ = xtd::net::ip_address::none;
101 };
102 }
103 }
104}
Provides an Internet Protocol (IP) address.
Definition ip_address.hpp:37
Contains IPAddress values used to join and drop multicast groups.
Definition multicast_option.hpp:39
const xtd::net::ip_address & group() const noexcept
Gets the IP address of a multicast group.
multicast_option(const xtd::net::ip_address &group, const xtd::net::ip_address &local_address)
Initializes a new instance of the xtd::net::sockets::multicast_option class with the specified IP mul...
multicast_option()=default
Initializes a new instance of the xtd::net::sockets::multicast_option class.
multicast_option(const xtd::net::ip_address &group)
Initializes a new version of the xtd::net::sockets::multicast_option class for the specified IP multi...
multicast_option(const xtd::net::ip_address &group, uint32 interface_index)
Initializes a new instance of the xtd::net::sockets::multicast_option class with the specified IP mul...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
#define core_export_
Define shared library export.
Definition core_export.hpp:13
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10