aboutsummaryrefslogtreecommitdiffstats
path: root/util/network
diff options
context:
space:
mode:
authorhindsight <hindsight@yandex-team.ru>2022-02-10 16:50:06 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:06 +0300
commitfe0f94e19a639b45108b1229c889c445edc7adef (patch)
treef6a5c3618af10803db34146c855e4a2bd8588893 /util/network
parent97ccada5638c88fa727d68a9ee849a9a768a54d9 (diff)
downloadydb-fe0f94e19a639b45108b1229c889c445edc7adef.tar.gz
Restoring authorship annotation for <hindsight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/network')
-rw-r--r--util/network/socket.cpp22
-rw-r--r--util/network/socket.h2
2 files changed, 12 insertions, 12 deletions
diff --git a/util/network/socket.cpp b/util/network/socket.cpp
index 4f6e804346..1421e5d97e 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");
}
diff --git a/util/network/socket.h b/util/network/socket.h
index 40c8648b40..cf8c1204a2 100644
--- a/util/network/socket.h
+++ b/util/network/socket.h
@@ -106,7 +106,7 @@ void SetKeepAlive(SOCKET s, bool value);
void SetCloseOnExec(SOCKET s, bool value);
void SetOutputBuffer(SOCKET s, unsigned value);
void SetInputBuffer(SOCKET s, unsigned value);
-void SetReusePort(SOCKET s, bool value);
+void SetReusePort(SOCKET s, bool value);
void ShutDown(SOCKET s, int mode);
bool GetRemoteAddr(SOCKET s, char* str, socklen_t size);
size_t GetMaximumSegmentSize(SOCKET s);