Tcp.cc
Go to the documentation of this file.
31 static_assert(std::is_trivially_copyable<Option>::value, "setsockopt() expects POD-like options");
32 static_assert(!std::is_same<Option, bool>::value, "setsockopt() uses int to represent boolean options");
58 const int count = (cfg.timeout + cfg.interval - 1) / cfg.interval; // XXX: unsigned-to-signed conversion
static bool SetSocketOption(const int fd, const int level, const int optName, const Option &optValue)
setsockopt(2) wrapper
Definition: Tcp.cc:29
static bool SetBooleanSocketOption(const int fd, const int level, const int optName, const bool enable)
setsockopt(2) wrapper for setting typical on/off options
Definition: Tcp.cc:44
void ApplyTcpKeepAlive(int fd, const TcpKeepAlive &)
apply configured TCP keep-alive settings to the given FD socket
Definition: Tcp.cc:51