net/SocketDescriptor: add method SetIntOption()
This commit is contained in:
parent
aea4d3c4b0
commit
089a843abd
@ -174,11 +174,14 @@ public:
|
|||||||
bool SetOption(int level, int name,
|
bool SetOption(int level, int name,
|
||||||
const void *value, std::size_t size) noexcept;
|
const void *value, std::size_t size) noexcept;
|
||||||
|
|
||||||
bool SetBoolOption(int level, int name, bool _value) noexcept {
|
bool SetIntOption(int level, int name, const int &value) noexcept {
|
||||||
const int value = _value;
|
|
||||||
return SetOption(level, name, &value, sizeof(value));
|
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 SetKeepAlive(bool value=true) noexcept;
|
||||||
bool SetReuseAddress(bool value=true) noexcept;
|
bool SetReuseAddress(bool value=true) noexcept;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user