diff --git a/src/net/SocketDescriptor.hxx b/src/net/SocketDescriptor.hxx index 960a621af..e1bbea5c6 100644 --- a/src/net/SocketDescriptor.hxx +++ b/src/net/SocketDescriptor.hxx @@ -174,11 +174,14 @@ public: bool SetOption(int level, int name, const void *value, std::size_t size) noexcept; - bool SetBoolOption(int level, int name, bool _value) noexcept { - const int value = _value; + bool SetIntOption(int level, int name, const int &value) noexcept { return SetOption(level, name, &value, sizeof(value)); } + bool SetBoolOption(int level, int name, bool value) noexcept { + return SetIntOption(level, name, value); + } + bool SetKeepAlive(bool value=true) noexcept; bool SetReuseAddress(bool value=true) noexcept;