aboutsummaryrefslogtreecommitdiffstats
path: root/util/network
diff options
context:
space:
mode:
authorAlexey Efimov <xeno@prnwatch.com>2022-02-10 16:49:41 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:41 +0300
commit26e0e4fb5e5cd6b4d7f4c21f9fcd7978891bf946 (patch)
treed34555f21d4d9f94f84d460e55b77d7eb41a953c /util/network
parentca3252a147a429eac4ba8221857493c58dcd09b5 (diff)
downloadydb-26e0e4fb5e5cd6b4d7f4c21f9fcd7978891bf946.tar.gz
Restoring authorship annotation for Alexey Efimov <xeno@prnwatch.com>. Commit 1 of 2.
Diffstat (limited to 'util/network')
-rw-r--r--util/network/address.cpp20
-rw-r--r--util/network/address.h2
-rw-r--r--util/network/sock.h16
3 files changed, 19 insertions, 19 deletions
diff --git a/util/network/address.cpp b/util/network/address.cpp
index a81a9e6994..08fc8139ee 100644
--- a/util/network/address.cpp
+++ b/util/network/address.cpp
@@ -140,16 +140,16 @@ IRemoteAddrPtr NAddr::GetSockAddr(SOCKET s) {
return addr;
}
-IRemoteAddrPtr NAddr::GetPeerAddr(SOCKET s) {
- auto addr = MakeHolder<TOpaqueAddr>();
-
- if (getpeername(s, addr->MutableAddr(), addr->LenPtr()) < 0) {
- ythrow TSystemError() << "getpeername() failed";
- }
-
- return addr;
-}
-
+IRemoteAddrPtr NAddr::GetPeerAddr(SOCKET s) {
+ auto addr = MakeHolder<TOpaqueAddr>();
+
+ if (getpeername(s, addr->MutableAddr(), addr->LenPtr()) < 0) {
+ ythrow TSystemError() << "getpeername() failed";
+ }
+
+ return addr;
+}
+
static const in_addr& InAddr(const IRemoteAddr& addr) {
return ((const sockaddr_in*)addr.Addr())->sin_addr;
}
diff --git a/util/network/address.h b/util/network/address.h
index 448fcac0c9..3a52bb3714 100644
--- a/util/network/address.h
+++ b/util/network/address.h
@@ -19,7 +19,7 @@ namespace NAddr {
using IRemoteAddrRef = TAtomicSharedPtr<NAddr::IRemoteAddr>;
IRemoteAddrPtr GetSockAddr(SOCKET s);
- IRemoteAddrPtr GetPeerAddr(SOCKET s);
+ IRemoteAddrPtr GetPeerAddr(SOCKET s);
void PrintHost(IOutputStream& out, const IRemoteAddr& addr);
TString PrintHost(const IRemoteAddr& addr);
diff --git a/util/network/sock.h b/util/network/sock.h
index b10be2f715..52c9c34623 100644
--- a/util/network/sock.h
+++ b/util/network/sock.h
@@ -265,10 +265,10 @@ struct TSockAddrInet: public sockaddr_in, public ISockAddr {
TIpPort GetPort() const noexcept {
return InetToHost(sin_port);
}
-
- void SetPort(TIpPort port) noexcept {
- sin_port = HostToInet(port);
- }
+
+ void SetPort(TIpPort port) noexcept {
+ sin_port = HostToInet(port);
+ }
};
struct TSockAddrInet6: public sockaddr_in6, public ISockAddr {
@@ -333,10 +333,10 @@ struct TSockAddrInet6: public sockaddr_in6, public ISockAddr {
TIpPort GetPort() const noexcept {
return InetToHost(sin6_port);
}
-
- void SetPort(TIpPort port) noexcept {
- sin6_port = HostToInet(port);
- }
+
+ void SetPort(TIpPort port) noexcept {
+ sin6_port = HostToInet(port);
+ }
};
using TSockAddrLocalStream = TSockAddrLocal;