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.
linger_option.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"
10 #include "../ip_address.h"
11 
13 namespace xtd {
15  namespace net {
17  namespace sockets {
26  class core_export_ linger_option : public xtd::object {
27  public:
29  linger_option() = default;
42  linger_option(bool enabled, uint32_t linger_time);
43 
46  linger_option(const linger_option& linger_option) = default;
47  linger_option& operator=(const linger_option&) = default;
48  friend std::ostream& operator <<(std::ostream& os, const linger_option& mo) noexcept {return os << mo.to_string();}
50 
62  bool enabled() const noexcept;
74  linger_option& enabled(bool value) noexcept;
75 
88  uint32_t linger_time() const noexcept;
101  linger_option& linger_time(uint32_t value) noexcept;
102 
103  private:
104  bool enabled_ = false;
105  uint32_t linger_time_ = 0;
106  };
107  }
108  }
109 }
virtual xtd::ustring to_string() const noexcept
Returns a std::string that represents the current object.
Specifies whether a xtd::net::sockets::socket will remain connected after a call to the xtd::net::soc...
Definition: linger_option.h:26
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:26