xtd 0.2.0
Loading...
Searching...
No Matches
ip_packet_information.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../ip_address.hpp"
7
9#undef unix
11
13namespace xtd {
15 namespace net {
17 namespace sockets {
19 class socket;
21
37 class core_export_ ip_packet_information : public xtd::object, public xtd::iequatable<xtd::net::sockets::ip_packet_information> {
38 public:
40
45
49 auto operator =(const ip_packet_information&) -> ip_packet_information& = default;
51
53
57 [[nodiscard]] auto address() const noexcept -> const xtd::net::ip_address&;
58
61 [[nodiscard]] auto interface() const noexcept -> xtd::int32;
63
65
70 [[nodiscard]] auto equals(const xtd::object& obj) const noexcept -> bool override;
74 [[nodiscard]] auto equals(const ip_packet_information& other) const noexcept -> bool override;
75
78 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::size override;
80
81 private:
82 friend class socket;
83 xtd::net::ip_address address_;
84 xtd::int32 address_interface_ = 0;
85 };
86 }
87 }
88}
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
auto get_hash_code() const noexcept -> xtd::size override
Serves as a hash function for a particular type.
ip_packet_information()=default
Creates an empty xtd::net::sockets::ip_packet_information instance.
auto equals(const xtd::object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
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::sock...
auto interface() const noexcept -> xtd::int32
Gets the network interface information that is associated with a call to xtd::net::sockets::socket::r...
Implements the Berkeley sockets interface.
Definition socket.hpp:77
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
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ other
The operating system is other.
Definition platform_id.hpp:60
Contains xtd::iequatable interface.
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.