xtd 0.2.0
Loading...
Searching...
No Matches
xtd::net::sockets::ip_packet_information Class Reference
Inheritance diagram for xtd::net::sockets::ip_packet_information:
xtd::object xtd::iequatable< xtd::net::sockets::ip_packet_information > xtd::interface xtd::extensions::equality_operators< xtd::net::sockets::ip_packet_information, iequatable< xtd::net::sockets::ip_packet_information > >

Definition

Gets the network interface information that is associated with a call to xtd::net::sockets::socket::receive_message_from or xtd::net::sockets::socket::end_receive_message_from.

class core_export_ ip_packet_information : public xtd::object, public xtd::iequatable<xtd::net::sockets::ip_packet_information>;
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
ip_packet_information()=default
Creates an empty xtd::net::sockets::ip_packet_information instance.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
#define core_export_
Define shared library export.
Definition core_export.hpp:13
Inheritance
xtd::objectxtd::net::sockets::ip_packet_information
Header
#include <xtd/net/sockets/ip_packet_information>
Namespace
xtd::net::sockets
Library
xtd.core

Public Constructors

 ip_packet_information ()=default
 Creates an empty xtd::net::sockets::ip_packet_information instance.
 

Public Properties

auto address () const noexcept -> const xtd::net::ip_address &
 Gets the origin information of the packet that was received as a result of calling the xtd::net::sockets::socket::receive_message_from method or xtd::net::sockets::socket::end_receive_message_from method.
 
auto interface () const noexcept -> xtd::int32
 Gets the network interface information that is associated with a call to xtd::net::sockets::socket::receive_message_from method or xtd::net::sockets::socket::end_receive_message_from.
 

Public Methods

auto equals (const xtd::object &obj) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
 
auto equals (const ip_packet_information &other) const noexcept -> bool override
 Determines whether the specified object is equal to the current object.
 
auto get_hash_code () const noexcept -> xtd::size 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 type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<class object_t>
xtd::unique_ptr_object< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const
 Returns a xtd::string that represents the current object.
 
template<class object_a_t, class object_b_t>
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<class object_a_t, class object_b_t>
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Constructor & Destructor Documentation

◆ ip_packet_information()

xtd::net::sockets::ip_packet_information::ip_packet_information ( )
default

Creates an empty xtd::net::sockets::ip_packet_information instance.

Member Function Documentation

◆ address()

auto xtd::net::sockets::ip_packet_information::address ( ) const -> const xtd::net::ip_address &
nodiscardnoexcept

Gets the origin information of the packet that was received as a result of calling the xtd::net::sockets::socket::receive_message_from method or xtd::net::sockets::socket::end_receive_message_from method.

Returns
An xtd::net::ip_address that indicates the origin information of the packet that was received as a result of calling the xtd::net::sockets::socket::receive_message_from method or xtd::net::sockets::socket::end_receive_message_from method. For packets that were sent from a unicast address, the xtd::net::sockets::ip_packet_information::address property will return the xtd::net::ip_address of the sender; for multicast or broadcast packets, the xtd::net::sockets::ip_packet_information::address property will return the multicast or broadcast xtd::net::ip_address.

◆ interface()

auto xtd::net::sockets::ip_packet_information::interface ( ) const -> xtd::int32
nodiscardnoexcept

Gets the network interface information that is associated with a call to xtd::net::sockets::socket::receive_message_from method or xtd::net::sockets::socket::end_receive_message_from.

Returns
An int32 value, which represents the index of the network interface. You can use this index with xtd::net::network_information::network_interface::get_all_network_interfaces() to get more information about the relevant interface.

◆ equals() [1/2]

auto xtd::net::sockets::ip_packet_information::equals ( const xtd::object & obj) const -> bool
nodiscardoverridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

Reimplemented from xtd::object.

◆ equals() [2/2]

auto xtd::net::sockets::ip_packet_information::equals ( const ip_packet_information & other) const -> bool
nodiscardoverridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
otherThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

Implements xtd::iequatable< xtd::net::sockets::ip_packet_information >.

◆ get_hash_code()

auto xtd::net::sockets::ip_packet_information::get_hash_code ( ) const -> xtd::size
nodiscardoverridevirtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

Reimplemented from xtd::object.


The documentation for this class was generated from the following file: