aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/session.cpp
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commit1f553f46fb4f3c5eec631352cdd900a0709016af (patch)
treea231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/messagebus/session.cpp
parentc4de7efdedc25b49cbea74bd589eecb61b55b60a (diff)
downloadydb-1f553f46fb4f3c5eec631352cdd900a0709016af.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/session.cpp')
-rw-r--r--library/cpp/messagebus/session.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/messagebus/session.cpp b/library/cpp/messagebus/session.cpp
index 46a7ece6a8..57d7ead401 100644
--- a/library/cpp/messagebus/session.cpp
+++ b/library/cpp/messagebus/session.cpp
@@ -1,16 +1,16 @@
#include "ybus.h"
-#include <util/generic/cast.h>
-
-using namespace NBus;
-
+#include <util/generic/cast.h>
+
+using namespace NBus;
+
namespace NBus {
TBusSession::TBusSession() {
}
////////////////////////////////////////////////////////////////////
/// \brief Adds peer of connection into connection list
-
+
int CompareByHost(const IRemoteAddr& l, const IRemoteAddr& r) noexcept {
if (l.Addr()->sa_family != r.Addr()->sa_family) {
return l.Addr()->sa_family < r.Addr()->sa_family ? -1 : +1;
@@ -50,7 +50,7 @@ namespace NBus {
bool SplitHost(const TString& host, TString* hostName, TString* portNum) {
hostName->clear();
portNum->clear();
-
+
// Simple check that we have to deal with ipv6 address specification or
// just host name or ipv4 address.
if (!host.empty() && (host[0] == '[')) {
@@ -97,7 +97,7 @@ namespace NBus {
if (!SplitHost(host, &hostName, &port)) {
hostName = host;
}
-
+
if (port.empty()) {
portNum = GetProto()->GetPort();
} else {
@@ -118,12 +118,12 @@ namespace NBus {
}
TBusClientSessionPtr TBusClientSession::Create(TBusProtocol* proto, IBusClientHandler* handler, const TBusClientSessionConfig& config, TBusMessageQueuePtr queue) {
- return queue->CreateSource(proto, handler, config);
-}
-
+ return queue->CreateSource(proto, handler, config);
+}
+
TBusServerSessionPtr TBusServerSession::Create(TBusProtocol* proto, IBusServerHandler* handler, const TBusServerSessionConfig& config, TBusMessageQueuePtr queue) {
- return queue->CreateDestination(proto, handler, config);
-}
+ return queue->CreateDestination(proto, handler, config);
+}
TBusServerSessionPtr TBusServerSession::Create(TBusProtocol* proto, IBusServerHandler* handler, const TBusServerSessionConfig& config, TBusMessageQueuePtr queue, const TVector<TBindResult>& bindTo) {
return queue->CreateDestination(proto, handler, config, bindTo);