xtd 0.2.0
ip_packet_information.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../ip_address.hpp"
6#include "../../iequatable.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 ip_packet_information& operator =(const ip_packet_information&) = default;
51
53
57 const xtd::net::ip_address& address() const noexcept;
58
61 int32 interface() const noexcept;
63
65
70 bool equals(const xtd::object& obj) const noexcept override;
74 bool equals(const ip_packet_information& other) const noexcept override;
75
78 xtd::size get_hash_code() const noexcept override;
80
81 private:
82 friend class socket;
83 xtd::net::ip_address address_;
84 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:22
Represent an interface class.
Definition interface.hpp:31
Provides an Internet Protocol (IP) address.
Definition ip_address.hpp:42
Gets the network interface information that is associated with a call to xtd::net::sockets::socket::r...
Definition ip_packet_information.hpp:37
ip_packet_information()=default
Creates an empty xtd::net::sockets::ip_packet_information instance.
const xtd::net::ip_address & address() const noexcept
Gets the origin information of the packet that was received as a result of calling the xtd::net::sock...
Implements the Berkeley sockets interface.
Definition socket.hpp:76
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
@ socket
The socket is not valid.
#define core_export_
Define shared library export.
Definition core_export.hpp:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10