diff options
author | leo <leo@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
commit | 980edcd3304699edf9d4e4d6a656e585028e2a72 (patch) | |
tree | 139f47f3911484ae9af0eb347b1a88bd6c4bb35f /util/network/socket.h | |
parent | b036a557f285146e5e35d4213e29a094ab907bcf (diff) | |
download | ydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz |
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/network/socket.h')
-rw-r--r-- | util/network/socket.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/network/socket.h b/util/network/socket.h index 40c8648b40..ea9c01f6bb 100644 --- a/util/network/socket.h +++ b/util/network/socket.h @@ -1,17 +1,17 @@ #pragma once - + #include "init.h" #include <util/system/yassert.h> #include <util/system/defaults.h> -#include <util/system/error.h> +#include <util/system/error.h> #include <util/stream/output.h> #include <util/stream/input.h> #include <util/generic/ptr.h> #include <util/generic/yexception.h> #include <util/generic/noncopyable.h> #include <util/datetime/base.h> - + #include <cerrno> #ifndef INET_ADDRSTRLEN @@ -50,14 +50,14 @@ int poll(struct pollfd fds[], nfds_t nfds, int timeout) noexcept; int inet_aton(const char* cp, struct in_addr* inp); #define get_host_error() WSAGetLastError() - + #define SHUT_RD SD_RECEIVE #define SHUT_WR SD_SEND #define SHUT_RDWR SD_BOTH #define INFTIM (-1) -#endif - +#endif + template <class T> static inline int SetSockOpt(SOCKET s, int level, int optname, T opt) noexcept { return setsockopt(s, level, optname, (const char*)&opt, sizeof(opt)); @@ -141,8 +141,8 @@ bool HasLocalAddress(SOCKET socket); **/ extern "C" bool IsReusePortAvailable(); -bool IsNonBlock(SOCKET fd); -void SetNonBlock(SOCKET fd, bool nonBlock = true); +bool IsNonBlock(SOCKET fd); +void SetNonBlock(SOCKET fd, bool nonBlock = true); struct addrinfo; |