diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/messagebus/coreconn.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/coreconn.h')
-rw-r--r-- | library/cpp/messagebus/coreconn.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/library/cpp/messagebus/coreconn.h b/library/cpp/messagebus/coreconn.h index fca228d82e..4d50e0b5fb 100644 --- a/library/cpp/messagebus/coreconn.h +++ b/library/cpp/messagebus/coreconn.h @@ -3,65 +3,65 @@ ////////////////////////////////////////////////////////////// /// \file /// \brief Definitions for asynchonous connection queue - + #include "base.h" #include "event_loop.h" #include "netaddr.h" #include <util/datetime/base.h> -#include <util/generic/algorithm.h> +#include <util/generic/algorithm.h> #include <util/generic/list.h> #include <util/generic/map.h> #include <util/generic/set.h> #include <util/generic/string.h> #include <util/generic/vector.h> #include <util/network/address.h> -#include <util/network/ip.h> +#include <util/network/ip.h> #include <util/network/poller.h> #include <util/string/util.h> #include <util/system/condvar.h> -#include <util/system/mutex.h> +#include <util/system/mutex.h> #include <util/system/thread.h> #include <util/thread/lfqueue.h> - + #include <deque> #include <utility> #ifdef NO_ERROR -#undef NO_ERROR +#undef NO_ERROR #endif #define BUS_WORKER_CONDVAR //#define BUS_WORKER_MIXED -namespace NBus { - class TBusConnection; - class TBusConnectionFactory; - class TBusServerFactory; - - using TBusConnectionList = TList<TBusConnection*>; +namespace NBus { + class TBusConnection; + class TBusConnectionFactory; + class TBusServerFactory; - /// @throw yexception - EIpVersion MakeIpVersion(bool allowIpv4, bool allowIpv6); + using TBusConnectionList = TList<TBusConnection*>; - inline bool WouldBlock() { - int syserr = LastSystemError(); - return syserr == EAGAIN || syserr == EINPROGRESS || syserr == EWOULDBLOCK || syserr == EINTR; - } + /// @throw yexception + EIpVersion MakeIpVersion(bool allowIpv4, bool allowIpv6); - class TBusSession; + inline bool WouldBlock() { + int syserr = LastSystemError(); + return syserr == EAGAIN || syserr == EINPROGRESS || syserr == EWOULDBLOCK || syserr == EINTR; + } - struct TMaxConnectedException: public yexception { - TMaxConnectedException(unsigned maxConnect) { - yexception& exc = *this; + class TBusSession; + + struct TMaxConnectedException: public yexception { + TMaxConnectedException(unsigned maxConnect) { + yexception& exc = *this; exc << TStringBuf("Exceeded maximum number of outstanding connections: "); - exc << maxConnect; - } - }; + exc << maxConnect; + } + }; - enum EPollType { - POLL_READ, - POLL_WRITE - }; + enum EPollType { + POLL_READ, + POLL_WRITE + }; } |