xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
ip_packet_information.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include "../ip_address.h"
7 
9 #undef unix
10 
13 namespace xtd {
15  namespace net {
17  namespace sockets {
19  class socket;
21 
29  public:
31  ip_packet_information() = default;
32 
36  ip_packet_information& operator=(const ip_packet_information&) = default;
38 
41  const xtd::net::ip_address& address() const noexcept;
42 
45  int32_t interface() const noexcept;
46 
47  private:
48  friend class socket;
49  xtd::net::ip_address address_;
50  int32_t address_interface_ = 0;
51  };
52  }
53  }
54 }
Implements the Berkeley sockets interface.
Definition: socket.h:63
Provides an Internet Protocol (IP) address.
Definition: ip_address.h:30
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Gets the network interface information that is associated with a call to xtd::net::sockets::socket::r...
Definition: ip_packet_information.h:28
Socket options apply to all sockets.
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.h:26
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...
int32_t interface() const noexcept
Gets the network interface information that is associated with a call to xtd::net::sockets::socket::r...