xtd 0.2.0
linger_option.h
Go to the documentation of this file.
1 #pragma once
5 #include "../ip_address.h"
6 #include "../../core_export.h"
7 #include "../../object.h"
8 #include "../../types.h"
9 #include "../../ustring.h"
10 
12 namespace xtd {
14  namespace net {
16  namespace sockets {
32  class core_export_ linger_option : public xtd::object {
33  public:
35 
38  linger_option() = default;
51  linger_option(bool enabled, uint32 linger_time);
53 
56  linger_option(const linger_option& linger_option) = default;
57  linger_option& operator =(const linger_option&) = default;
59 
61 
74  bool enabled() const noexcept;
86  linger_option& enabled(bool value) noexcept;
87 
100  uint32 linger_time() const noexcept;
113  linger_option& linger_time(uint32 value) noexcept;
115 
116  private:
117  bool enabled_ = false;
118  uint32 linger_time_ = 0;
119  };
120  }
121  }
122 }
Specifies whether a xtd::net::sockets::socket will remain connected after a call to the xtd::net::soc...
Definition: linger_option.h:32
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:32
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239