aboutsummaryrefslogtreecommitdiffstats
path: root/util/network
diff options
context:
space:
mode:
authorkimkim <kimkim@yandex-team.ru>2022-02-10 16:49:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:27 +0300
commit13f84424ed9975f6827d9786087c6fe6ea265cda (patch)
treeb94acc282c49a5de96b9e3e19feead21736f3273 /util/network
parent35f29a67a6b8e50e1826c837330086049114c5ba (diff)
downloadydb-13f84424ed9975f6827d9786087c6fe6ea265cda.tar.gz
Restoring authorship annotation for <kimkim@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/network')
-rw-r--r--util/network/address.cpp24
-rw-r--r--util/network/address.h2
-rw-r--r--util/network/hostip.cpp2
-rw-r--r--util/network/hostip.h2
-rw-r--r--util/network/init.cpp2
-rw-r--r--util/network/ip_ut.cpp2
-rw-r--r--util/network/poller.h2
-rw-r--r--util/network/pollerimpl.h10
-rw-r--r--util/network/socket.cpp6
-rw-r--r--util/network/socket.h2
-rw-r--r--util/network/socket_ut.cpp14
11 files changed, 34 insertions, 34 deletions
diff --git a/util/network/address.cpp b/util/network/address.cpp
index a81a9e6994..4ed77db6e9 100644
--- a/util/network/address.cpp
+++ b/util/network/address.cpp
@@ -1,5 +1,5 @@
-#include <util/stream/str.h>
-
+#include <util/stream/str.h>
+
#include "address.h"
#if defined(_unix_)
@@ -119,17 +119,17 @@ void NAddr::PrintHost(IOutputStream& out, const IRemoteAddr& addr) {
}
TString NAddr::PrintHost(const IRemoteAddr& addr) {
- TStringStream ss;
- PrintAddr<false>(ss, addr);
- return ss.Str();
-}
-
+ TStringStream ss;
+ PrintAddr<false>(ss, addr);
+ return ss.Str();
+}
+
TString NAddr::PrintHostAndPort(const IRemoteAddr& addr) {
- TStringStream ss;
- PrintAddr<true>(ss, addr);
- return ss.Str();
-}
-
+ TStringStream ss;
+ PrintAddr<true>(ss, addr);
+ return ss.Str();
+}
+
IRemoteAddrPtr NAddr::GetSockAddr(SOCKET s) {
auto addr = MakeHolder<TOpaqueAddr>();
diff --git a/util/network/address.h b/util/network/address.h
index 448fcac0c9..ebc636869f 100644
--- a/util/network/address.h
+++ b/util/network/address.h
@@ -21,7 +21,7 @@ namespace NAddr {
IRemoteAddrPtr GetSockAddr(SOCKET s);
IRemoteAddrPtr GetPeerAddr(SOCKET s);
void PrintHost(IOutputStream& out, const IRemoteAddr& addr);
-
+
TString PrintHost(const IRemoteAddr& addr);
TString PrintHostAndPort(const IRemoteAddr& addr);
diff --git a/util/network/hostip.cpp b/util/network/hostip.cpp
index cb8d43bf90..66e8850cfc 100644
--- a/util/network/hostip.cpp
+++ b/util/network/hostip.cpp
@@ -1,7 +1,7 @@
#include "socket.h"
#include "hostip.h"
-#include <util/system/defaults.h>
+#include <util/system/defaults.h>
#include <util/system/byteorder.h>
#if defined(_unix_) || defined(_cygwin_)
diff --git a/util/network/hostip.h b/util/network/hostip.h
index cf63e4846a..5d1e2db1a9 100644
--- a/util/network/hostip.h
+++ b/util/network/hostip.h
@@ -1,6 +1,6 @@
#pragma once
-#include <util/system/defaults.h>
+#include <util/system/defaults.h>
namespace NResolver {
// resolve hostname and fills up to *slots slots in ip array;
diff --git a/util/network/init.cpp b/util/network/init.cpp
index 366e65682c..d7a5f22fb3 100644
--- a/util/network/init.cpp
+++ b/util/network/init.cpp
@@ -2,7 +2,7 @@
#include <util/system/compat.h>
#include <util/system/yassert.h>
-#include <util/system/defaults.h>
+#include <util/system/defaults.h>
#include <util/generic/singleton.h>
#include <cstdio>
diff --git a/util/network/ip_ut.cpp b/util/network/ip_ut.cpp
index 6716c6a699..eb7e557e62 100644
--- a/util/network/ip_ut.cpp
+++ b/util/network/ip_ut.cpp
@@ -2,7 +2,7 @@
#include <library/cpp/testing/unittest/registar.h>
-#include <util/generic/yexception.h>
+#include <util/generic/yexception.h>
class TSysIpTest: public TTestBase {
UNIT_TEST_SUITE(TSysIpTest);
diff --git a/util/network/poller.h b/util/network/poller.h
index 8dccd73140..5970eeed64 100644
--- a/util/network/poller.h
+++ b/util/network/poller.h
@@ -2,7 +2,7 @@
#include "socket.h"
-#include <util/generic/ptr.h>
+#include <util/generic/ptr.h>
#include <util/datetime/base.h>
class TSocketPoller {
diff --git a/util/network/pollerimpl.h b/util/network/pollerimpl.h
index e8c7e40fba..08cd063c92 100644
--- a/util/network/pollerimpl.h
+++ b/util/network/pollerimpl.h
@@ -4,11 +4,11 @@
#include <util/system/error.h>
#include <util/system/mutex.h>
-#include <util/system/defaults.h>
-#include <util/generic/ylimits.h>
-#include <util/generic/utility.h>
+#include <util/system/defaults.h>
+#include <util/generic/ylimits.h>
+#include <util/generic/utility.h>
#include <util/generic/vector.h>
-#include <util/generic/yexception.h>
+#include <util/generic/yexception.h>
#include <util/datetime/base.h>
#if defined(_freebsd_) || defined(_darwin_)
@@ -164,7 +164,7 @@ public:
return EIO;
}
- return event->fflags;
+ return event->fflags;
}
static inline int ExtractFilterImpl(const TEvent* event) noexcept {
diff --git a/util/network/socket.cpp b/util/network/socket.cpp
index 4f6e804346..be7bf20acd 100644
--- a/util/network/socket.cpp
+++ b/util/network/socket.cpp
@@ -4,7 +4,7 @@
#include "pollerimpl.h"
#include "iovec.h"
-#include <util/system/defaults.h>
+#include <util/system/defaults.h>
#include <util/system/byteorder.h>
#if defined(_unix_)
@@ -33,7 +33,7 @@
#include <util/system/compat.h>
#endif
-#include <util/generic/ylimits.h>
+#include <util/generic/ylimits.h>
#include <util/string/cast.h>
#include <util/stream/mem.h>
@@ -1241,7 +1241,7 @@ ssize_t PollD(struct pollfd fds[], nfds_t nfds, const TInstant& deadLine) noexce
if (res < 0) {
const int err = LastSystemError();
- if (err != ETIMEDOUT && err != EINTR) {
+ if (err != ETIMEDOUT && err != EINTR) {
return -err;
}
}
diff --git a/util/network/socket.h b/util/network/socket.h
index 40c8648b40..5ec92eeb2b 100644
--- a/util/network/socket.h
+++ b/util/network/socket.h
@@ -3,7 +3,7 @@
#include "init.h"
#include <util/system/yassert.h>
-#include <util/system/defaults.h>
+#include <util/system/defaults.h>
#include <util/system/error.h>
#include <util/stream/output.h>
#include <util/stream/input.h>
diff --git a/util/network/socket_ut.cpp b/util/network/socket_ut.cpp
index 6b20e11f70..90b952f62f 100644
--- a/util/network/socket_ut.cpp
+++ b/util/network/socket_ut.cpp
@@ -5,7 +5,7 @@
#include <library/cpp/testing/unittest/registar.h>
#include <util/string/builder.h>
-#include <util/generic/vector.h>
+#include <util/generic/vector.h>
#include <ctime>
@@ -246,7 +246,7 @@ sockaddr_in TPollTest::GetAddress(ui32 ip, ui16 port) {
SOCKET TPollTest::CreateSocket() {
SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
if (s == INVALID_SOCKET) {
- ythrow yexception() << "Can not create socket (" << LastSystemErrorText() << ")";
+ ythrow yexception() << "Can not create socket (" << LastSystemErrorText() << ")";
}
return s;
}
@@ -255,10 +255,10 @@ SOCKET TPollTest::StartServerSocket(ui16 port, int backlog) {
TSocketHolder s(CreateSocket());
sockaddr_in addr = GetAddress(ntohl(INADDR_ANY), port);
if (bind(s, (sockaddr*)&addr, sizeof(addr)) == SOCKET_ERROR) {
- ythrow yexception() << "Can not bind server socket (" << LastSystemErrorText() << ")";
+ ythrow yexception() << "Can not bind server socket (" << LastSystemErrorText() << ")";
}
if (listen(s, backlog) == SOCKET_ERROR) {
- ythrow yexception() << "Can not listen on server socket (" << LastSystemErrorText() << ")";
+ ythrow yexception() << "Can not listen on server socket (" << LastSystemErrorText() << ")";
}
return s.Release();
}
@@ -267,7 +267,7 @@ SOCKET TPollTest::StartClientSocket(ui32 ip, ui16 port) {
TSocketHolder s(CreateSocket());
sockaddr_in addr = GetAddress(ip, port);
if (connect(s, (sockaddr*)&addr, sizeof(addr)) == SOCKET_ERROR) {
- ythrow yexception() << "Can not connect client socket (" << LastSystemErrorText() << ")";
+ ythrow yexception() << "Can not connect client socket (" << LastSystemErrorText() << ")";
}
return s.Release();
}
@@ -275,7 +275,7 @@ SOCKET TPollTest::StartClientSocket(ui32 ip, ui16 port) {
SOCKET TPollTest::AcceptConnection(SOCKET serverSocket) {
SOCKET connectedSocket = accept(serverSocket, nullptr, nullptr);
if (connectedSocket == INVALID_SOCKET) {
- ythrow yexception() << "Can not accept connection on server socket (" << LastSystemErrorText() << ")";
+ ythrow yexception() << "Can not accept connection on server socket (" << LastSystemErrorText() << ")";
}
return connectedSocket;
}
@@ -300,7 +300,7 @@ void TPollTest::TestPollInOut() {
if (i % 5 == 0 || i % 5 == 2) {
char buffer = 'c';
if (send(*clientSocket, &buffer, 1, 0) == -1)
- ythrow yexception() << "Can not send (" << LastSystemErrorText() << ")";
+ ythrow yexception() << "Can not send (" << LastSystemErrorText() << ")";
}
TSimpleSharedPtr<TSocketHolder> connectedSocket(new TSocketHolder(AcceptConnection(serverSocket)));