diff options
author | hindsight <[email protected]> | 2022-02-10 16:50:06 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:06 +0300 |
commit | a76f5e1efe665e1bb125f05ae275b2a6226517d9 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/network/socket.cpp | |
parent | fe0f94e19a639b45108b1229c889c445edc7adef (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/network/socket.cpp')
-rw-r--r-- | util/network/socket.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/network/socket.cpp b/util/network/socket.cpp index 1421e5d97e6..4f6e8043462 100644 --- a/util/network/socket.cpp +++ b/util/network/socket.cpp @@ -307,20 +307,20 @@ void SetInputBuffer(SOCKET s, unsigned value) { CheckedSetSockOpt(s, SOL_SOCKET, SO_RCVBUF, value, "input buffer"); } -#if defined(_linux_) && !defined(SO_REUSEPORT) +#if defined(_linux_) && !defined(SO_REUSEPORT) #define SO_REUSEPORT 15 -#endif - -void SetReusePort(SOCKET s, bool value) { -#if defined(SO_REUSEPORT) - CheckedSetSockOpt(s, SOL_SOCKET, SO_REUSEPORT, (int)value, "reuse port"); -#else +#endif + +void SetReusePort(SOCKET s, bool value) { +#if defined(SO_REUSEPORT) + CheckedSetSockOpt(s, SOL_SOCKET, SO_REUSEPORT, (int)value, "reuse port"); +#else Y_UNUSED(s); Y_UNUSED(value); - ythrow TSystemError(ENOSYS) << "SO_REUSEPORT is not defined"; -#endif -} - + ythrow TSystemError(ENOSYS) << "SO_REUSEPORT is not defined"; +#endif +} + void SetNoDelay(SOCKET s, bool value) { CheckedSetSockOpt(s, IPPROTO_TCP, TCP_NODELAY, (int)value, "tcp no delay"); } |