xtd - Reference Guide 0.2.0
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 {
31  class core_export_ linger_option : public xtd::object {
32  public:
34 
37  linger_option() = default;
50  linger_option(bool enabled, uint32_t linger_time);
52 
55  linger_option(const linger_option& linger_option) = default;
56  linger_option& operator=(const linger_option&) = default;
57  friend std::ostream& operator <<(std::ostream& os, const linger_option& mo) noexcept {return os << mo.to_string();}
59 
61 
74  bool enabled() const noexcept;
86  linger_option& enabled(bool value) noexcept;
87 
100  uint32_t linger_time() const noexcept;
113  linger_option& linger_time(uint32_t value) noexcept;
115 
116  private:
117  bool enabled_ = false;
118  uint32_t linger_time_ = 0;
119  };
120  }
121  }
122 }
virtual xtd::ustring to_string() const noexcept
Returns a sxd::ustring 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:31
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:30