xtd 0.2.0
Loading...
Searching...
No Matches
multicast_option.h
Go to the documentation of this file.
1
4#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
12namespace xtd {
14 namespace net {
16 namespace sockets {
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:
96 xtd::net::ip_address group_ = xtd::net::ip_address::none;
97 uint32 interface_index_ = 0;
98 xtd::net::ip_address local_address_ = xtd::net::ip_address::none;
99 };
100 }
101 }
102}
Provides an Internet Protocol (IP) address.
Definition ip_address.h:35
Contains IPAddress values used to join and drop multicast groups.
Definition multicast_option.h:37
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.h:32
#define core_export_
Define shared library export.
Definition core_export.h:13
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition types.h:241
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10