net/SocketDescriptor: add method SetKeepAlive()
This commit is contained in:
@@ -206,6 +206,12 @@ SocketDescriptor::SetOption(int level, int name,
|
||||
return setsockopt(fd, level, name, (const char *)value, size) == 0;
|
||||
}
|
||||
|
||||
bool
|
||||
SocketDescriptor::SetKeepAlive(bool value)
|
||||
{
|
||||
return SetBoolOption(SOL_SOCKET, SO_KEEPALIVE, value);
|
||||
}
|
||||
|
||||
bool
|
||||
SocketDescriptor::SetReuseAddress(bool value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user