47 inline namespace options {
52 static void set(
socket&,
bool enabled) noexcept;
54 static bool get(
const socket&) noexcept;
72 template<
typename Duration>
74 namespace ch = std::chrono;
76 set_impl(
socket, ch::duration_cast<ch::milliseconds>(d));
78 static std::chrono::milliseconds
get(
const socket&) noexcept;
81 static void set_impl(
socket&, std::chrono::milliseconds) noexcept;
108 static bool get(
const socket&) noexcept;
124 template<
typename Duration>
126 namespace ch = std::chrono;
128 set_impl(sock, enabled, ch::duration_cast<ch::seconds>(
timeout));
131 static std::tuple<bool, std::chrono::seconds>
get(
const socket&) noexcept;
134 static void set_impl(
socket&,
bool enabled, std::chrono::seconds
timeout) noexcept;
constexpr linger_t linger
Enable linger on socket.close on TCP socket.
Dummy type for timeout option.
static void set(socket &socket, Duration d) noexcept
Dummy type for keep_alive option.
constexpr keep_alive_t keep_alive
Enable keep-alive probes on TCP socket.
Dummy type for no_delay option.
Dummy type for linger option.
static void set(socket &sock, bool enabled, Duration timeout) noexcept
constexpr no_delay_t no_delay
Disable the Nagle algorithm on TCP socket.
Descriptor wrapper for TCP socket.
constexpr timeout_t timeout
Set transmission timeout for TCP socket.
static void set(socket &, bool enabled) noexcept