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 "../../string.h"
10
12namespace xtd {
14 namespace net {
16 namespace sockets {
35 public:
37
40 linger_option() = default;
53 linger_option(bool enabled, uint32 linger_time);
55
59 linger_option& operator =(const linger_option&) = default;
61
63
76 bool enabled() const noexcept;
88 linger_option& enabled(bool value) noexcept;
89
102 uint32 linger_time() const noexcept;
115 linger_option& linger_time(uint32 value) noexcept;
117
118 private:
119 bool enabled_ = false;
120 uint32 linger_time_ = 0;
121 };
122 }
123 }
124}
Specifies whether a xtd::net::sockets::socket will remain connected after a call to the xtd::net::soc...
Definition linger_option.h:34
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:42
#define core_export_
Define shared library export.
Definition core_export.h:13
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.h:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10