diff options
author | nga <nga@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
commit | 1f553f46fb4f3c5eec631352cdd900a0709016af (patch) | |
tree | a231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/messagebus/session.cpp | |
parent | c4de7efdedc25b49cbea74bd589eecb61b55b60a (diff) | |
download | ydb-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.cpp | 24 |
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); |