xtd 0.2.0
Loading...
Searching...
No Matches
linger_option.h
Go to the documentation of this file.
1
4#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
12namespace xtd {
14 namespace net {
16 namespace sockets {
33 public:
35
38 linger_option() = default;
51 linger_option(bool enabled, uint32 linger_time);
53
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
linger_option(bool enabled, uint32 linger_time)
Initializes a new version of the xtd::net::sockets::linger_option class for the specified IP multicas...
linger_option()=default
Initializes a new instance of the xtd::net::sockets::linger_option class.
bool enabled() const noexcept
Gets a value that indicates whether to linger after the xtd::net::sockets::socket is closed.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
#define core_export_
Define shared library export.
Definition core_export.h:13
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition types.h:241
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10