summaryrefslogtreecommitdiffstats
path: root/util/network
diff options
context:
space:
mode:
authorgulin <[email protected]>2022-02-10 16:47:32 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:32 +0300
commit7199613d295246a07c2f7b331fbb3128936039dc (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /util/network
parentc807aae441c17fc7f577c35757a4b6e0bd909802 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/network')
-rw-r--r--util/network/init.cpp4
-rw-r--r--util/network/init.h24
-rw-r--r--util/network/socket.h2
3 files changed, 15 insertions, 15 deletions
diff --git a/util/network/init.cpp b/util/network/init.cpp
index d4dd413fb26..366e65682c3 100644
--- a/util/network/init.cpp
+++ b/util/network/init.cpp
@@ -16,7 +16,7 @@ namespace {
signal(SIGPIPE, SIG_IGN);
#endif
-#if defined(_win_)
+#if defined(_win_)
#pragma comment(lib, "ws2_32.lib")
WSADATA wsaData;
int result = WSAStartup(MAKEWORD(2, 2), &wsaData);
@@ -31,4 +31,4 @@ namespace {
void InitNetworkSubSystem() {
(void)Singleton<TNetworkInit>();
-}
+}
diff --git a/util/network/init.h b/util/network/init.h
index 7d5c1dc0abb..08a79c0fcaa 100644
--- a/util/network/init.h
+++ b/util/network/init.h
@@ -1,35 +1,35 @@
#pragma once
-
+
#include <util/system/error.h>
-
-#if defined(_unix_)
+
+#if defined(_unix_)
#include <fcntl.h>
#include <netdb.h>
#include <time.h>
#include <unistd.h>
#include <poll.h>
-
+
#include <sys/uio.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
-
+
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
-
+
using SOCKET = int;
-
+
#define closesocket(s) close(s)
#define SOCKET_ERROR -1
#define INVALID_SOCKET -1
#define WSAGetLastError() errno
-#elif defined(_win_)
+#elif defined(_win_)
#include <util/system/winint.h>
#include <io.h>
#include <winsock2.h>
#include <ws2tcpip.h>
-
+
using nfds_t = ULONG;
#undef Yield
@@ -50,9 +50,9 @@ struct sockaddr_un {
#define MSG_NOSIGNAL 0
#endif
#endif // _win_ or _darwin_
-
-void InitNetworkSubSystem();
-
+
+void InitNetworkSubSystem();
+
static struct TNetworkInitializer {
inline TNetworkInitializer() {
InitNetworkSubSystem();
diff --git a/util/network/socket.h b/util/network/socket.h
index 1128d5923a8..40c8648b409 100644
--- a/util/network/socket.h
+++ b/util/network/socket.h
@@ -22,7 +22,7 @@
#define get_host_error() h_errno
#elif defined(_win_)
#pragma comment(lib, "Ws2_32.lib")
-
+
#if _WIN32_WINNT < 0x0600
struct pollfd {
SOCKET fd;