Contains IPAddress values used to join and drop multicast groups.
| Parameter | Value |
|---|---|
| socket_option_level | xtd::net::sockets::socket_option_level::udp |
| socket_option_name | xtd::net::sockets::socket_option_name::add_membership |
| object | xtd::net::sockets::multicast_option |
Public Constructors | |
| multicast_option ()=default | |
| Initializes a new instance of the xtd::net::sockets::multicast_option class. | |
| 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 multicast group and the local interface address. | |
| multicast_option (const xtd::net::ip_address &group) | |
| Initializes a new version of the xtd::net::sockets::multicast_option class for the specified IP multicast group. | |
| 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 multicast group and the local interface address. | |
Public Properties | |
| auto | group () const noexcept -> const xtd::net::ip_address & |
| Gets the IP address of a multicast group. | |
| auto | group (const xtd::net::ip_address &value) noexcept -> multicast_option & |
| Sets the IP address of a multicast group. | |
| auto | interface_index () const noexcept -> xtd::uint32 |
| Gets the interface index that is associated with a multicast group. | |
| auto | interface_index (xtd::uint32 value) noexcept -> multicast_option & |
| Sets the interface index that is associated with a multicast group. | |
| auto | local_address () const noexcept -> const xtd::net::ip_address & |
| Gets the local IP address associated with a multicast group. | |
| auto | local_address (const xtd::net::ip_address &value) noexcept -> multicast_option & |
| Sets he local IP address associated with a multicast group. | |
Public Methods | |
| auto | equals (const object &obj) const noexcept -> bool override |
| Determines whether the specified object is equal to the current object. | |
| auto | equals (const multicast_option &other) const noexcept -> bool override |
| Determines whether the specified object is equal to the current object. | |
| auto | get_hash_code () const noexcept -> xtd::usize override |
| Serves as a hash function for a particular type. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
|
default |
Initializes a new instance of the xtd::net::sockets::multicast_option class.
| xtd::net::sockets::multicast_option::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 multicast group and the local interface address.
| group | The xtd::net::ip_address of the multicast group. |
| local_address | The local xtd::net::ip_address. |
|
explicit |
Initializes a new version of the xtd::net::sockets::multicast_option class for the specified IP multicast group.
| group | The xtd::net::ip_address of the multicast group. |
| xtd::net::sockets::multicast_option::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 multicast group and the local interface address.
| group | The xtd::net::ip_address of the multicast group. |
| interface_index | The address of the interface. |
| xtd::argument_out_of_range_exception | interface_index > 0x00FFFFFF. |
|
nodiscardnoexcept |
Gets the IP address of a multicast group.
|
noexcept |
Sets the IP address of a multicast group.
| value | An xtd::net::ip_address that contains the Internet address of a multicast group. |
|
nodiscardnoexcept |
Gets the interface index that is associated with a multicast group.
|
noexcept |
Sets the interface index that is associated with a multicast group.
| value | A uint32 value that specifies the address of the interface. |
|
nodiscardnoexcept |
Gets the local IP address associated with a multicast group.
|
noexcept |
Sets he local IP address associated with a multicast group.
| value | An xtd::net::ip_address that contains the local address associated with a multicast group. |
|
nodiscardoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
nodiscardoverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| other | The object to compare with the current object. |
Implements xtd::iequatable< xtd::net::sockets::multicast_option >.
|
nodiscardoverridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.