boost::corosio::tcp_socket::set_keep_alive

Enable or disable SO_KEEPALIVE.

Synopsis

void
set_keep_alive(bool value);

Description

When enabled, the socket will periodically send keepalive probes to detect if the peer is still reachable.

Exceptions

Name

Thrown on

std::logic_error

if the socket is not open.

std::system_error

on failure.

Parameters

Name Description

value

true to enable keepalive probes.

Created with MrDocs