xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
socket_information.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include "../../core_export.h"
7 #include "../../object.h"
8 #include "../../types.h"
9 #include "../../ustring.h"
11 
13 namespace xtd {
15  namespace net {
17  namespace sockets {
26  public:
28  socket_information() = default;
29 
33  socket_information& operator=(const socket_information&) = default;
34  friend std::ostream& operator <<(std::ostream& os, const socket_information& mo) noexcept {return os << mo.to_string();}
36 
45  socket_information& options(xtd::net::sockets::socket_information_options value) noexcept;
46 
49  const std::vector<byte_t>& protocol_information() const noexcept;
53  socket_information& protocol_information(const std::vector<byte_t>& value) noexcept;
54 
55  private:
56  xtd::net::sockets::socket_information_options options_ = xtd::net::sockets::socket_information_options::none;
57  std::vector<byte_t> protocol_information_;
58  };
59  }
60  }
61 }
Encapsulates the information that is necessary to duplicate a xtd::net::sockets::socket.
Definition: socket_information.h:25
socket_information()=default
Initializes a new instance of the xtd::net::sockets::socket_information class.
xtd::net::sockets::socket_information_options options() const noexcept
Gets the options for a xtd::net::sockets::socket.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
virtual xtd::ustring to_string() const noexcept
Returns a std::string that represents the current object.
#define core_export_
Define shared library export.
Definition: core_export.h:13
socket_information_options
Describes states for a xtd::net::sockets::socket. This enumeration has a flags attribute that allows ...
Definition: socket_information_options.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::net::sockets::socket_information_options enum.