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"
7#include "../../object.hpp"
8#include "../../types.hpp"
9#include "../../string.hpp"
10
12namespace xtd {
14 namespace net {
16 namespace sockets {
39 class core_export_ multicast_option : public xtd::object, public xtd::iequatable<xtd::net::sockets::multicast_option> {
40 public:
42
45 multicast_option() = default;
59
63 auto operator =(const multicast_option&) -> multicast_option& = default;
65
67
71 [[nodiscard]] auto group() const noexcept -> const xtd::net::ip_address&;
75 auto group(const xtd::net::ip_address& value) noexcept -> multicast_option&;
76
80 [[nodiscard]] auto interface_index() const noexcept -> xtd::uint32;
85 auto interface_index(xtd::uint32 value) noexcept -> multicast_option&;
86
89 [[nodiscard]] auto local_address() const noexcept -> const xtd::net::ip_address&;
93 auto local_address(const xtd::net::ip_address& value) noexcept -> multicast_option&;
95
97
102 [[nodiscard]] auto equals(const object& obj) const noexcept -> bool override;
106 [[nodiscard]] auto equals(const multicast_option& other) const noexcept -> bool override;
107
110 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::size override;
112
113 private:
114 xtd::net::ip_address group_ = xtd::net::ip_address::none;
115 uint32 interface_index_ = 0;
116 xtd::net::ip_address local_address_ = xtd::net::ip_address::none;
117 };
118 }
119 }
120}
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
Provides an Internet Protocol (IP) address.
Definition ip_address.hpp:42
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...
auto group() const noexcept -> const xtd::net::ip_address &
Gets the IP address of a multicast group.
auto local_address() const noexcept -> const xtd::net::ip_address &
Gets the local IP address associated with a multicast group.
auto interface_index() const noexcept -> xtd::uint32
Gets the interface index that is associated with a multicast group.
auto get_hash_code() const noexcept -> xtd::size override
Serves as a hash function for a particular type.
multicast_option()=default
Initializes a new instance of the xtd::net::sockets::multicast_option class.
auto equals(const object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
multicast_option(const xtd::net::ip_address &group, xtd::uint32 interface_index)
Initializes a new instance of the xtd::net::sockets::multicast_option class with the specified IP mul...
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...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Contains core_export_ keyword.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
@ none
none of the socket operations.
Definition socket_async_operation.hpp:34
@ other
The operating system is other.
Definition platform_id.hpp:60
The xtd::net::sockets namespace provides a managed implementation of the Berkeley Sockets interface f...
Definition address_family.hpp:16
The xtd::net namespace provides a simple programming interface for many of the protocols used on netw...
Definition cookie_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::net::ip_address class.
Contains xtd::object class.
Contains xtd::string alias.
Contains xtd fundamental types.