xtd 0.2.0
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 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
Provides an Internet Protocol (IP) address.
Definition ip_address.hpp:42
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
int32 interface() const noexcept
Gets the network interface information that is associated with a call to xtd::net::sockets::socket::r...
ip_packet_information()=default
Creates an empty xtd::net::sockets::ip_packet_information instance.
bool equals(const xtd::object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
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:77
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
#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
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ other
The operating system is other.
Definition platform_id.hpp:58
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.