diff options
author | AlexSm <alex@ydb.tech> | 2024-08-19 16:16:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 17:16:30 +0300 |
commit | 9b567afd3339f4525feab53873592cb025b14251 (patch) | |
tree | 5c8489f98dc5a9a10f66065055e5a401bbd14767 /library/cpp/netliba/socket | |
parent | 47bd121575c210d4bbb2dddcc2131759a694df05 (diff) | |
download | ydb-9b567afd3339f4525feab53873592cb025b14251.tar.gz |
Library import 240819-0942 (#7994)
Co-authored-by: robot-piglet <robot-piglet@yandex-team.com>
Co-authored-by: hiddenpath <hiddenpath@yandex-team.com>
Co-authored-by: bulatman <bulatman@yandex-team.com>
Co-authored-by: robot-contrib <robot-contrib@yandex-team.com>
Co-authored-by: osidorkin <osidorkin@yandex-team.com>
Co-authored-by: akhropov <akhropov@yandex-team.com>
Co-authored-by: akozhikhov <akozhikhov@yandex-team.com>
Co-authored-by: orlovorlov <orlovorlov@yandex-team.com>
Co-authored-by: babenko <babenko@yandex-team.com>
Co-authored-by: shadchin <shadchin@yandex-team.com>
Co-authored-by: dmasloff <dmasloff@yandex-team.com>
Co-authored-by: aleksei-le <aleksei-le@yandex-team.com>
Co-authored-by: coteeq <coteeq@yandex-team.com>
Co-authored-by: dimdim11 <dimdim11@yandex-team.com>
Co-authored-by: robot-ya-builder <robot-ya-builder@yandex-team.com>
Co-authored-by: iaz1607 <iaz1607@yandex-team.com>
Diffstat (limited to 'library/cpp/netliba/socket')
-rw-r--r-- | library/cpp/netliba/socket/packet_queue.h | 6 | ||||
-rw-r--r-- | library/cpp/netliba/socket/socket.h | 4 | ||||
-rw-r--r-- | library/cpp/netliba/socket/udp_recv_packet.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/netliba/socket/packet_queue.h b/library/cpp/netliba/socket/packet_queue.h index 58a84709c2..a81e956862 100644 --- a/library/cpp/netliba/socket/packet_queue.h +++ b/library/cpp/netliba/socket/packet_queue.h @@ -20,9 +20,9 @@ namespace NNetlibaSocket { template <size_t TTNumWriterThreads> class TLockFreePacketQueue { private: - enum { MAX_PACKETS_IN_QUEUE = INT_MAX, - CMD_QUEUE_RESERVE = 1 << 20, - MAX_DATA_IN_QUEUE = 32 << 20 }; + static constexpr int MAX_PACKETS_IN_QUEUE = INT_MAX; + static constexpr int CMD_QUEUE_RESERVE = 1 << 20; + static constexpr int MAX_DATA_IN_QUEUE = 32 << 20; typedef std::pair<TUdpRecvPacket*, TPacketMeta> TPacket; typedef std::conditional_t<TTNumWriterThreads == 1, NThreading::TOneOneQueue<TPacket>, NThreading::TManyOneQueue<TPacket, TTNumWriterThreads>> TImpl; diff --git a/library/cpp/netliba/socket/socket.h b/library/cpp/netliba/socket/socket.h index c1da3c145f..0b30bd2ccf 100644 --- a/library/cpp/netliba/socket/socket.h +++ b/library/cpp/netliba/socket/socket.h @@ -74,8 +74,8 @@ namespace NNetlibaSocket { /////////////////////////////////////////////////////////////////////////////// // currently netliba v6 version id is any number which's not equal to NETLIBA_V12_VERSION - enum { NETLIBA_ANY_VERSION = -1, - NETLIBA_V12_VERSION = 112 }; + constexpr int NETLIBA_ANY_VERSION = -1; + constexpr int NETLIBA_V12_VERSION = 112; enum EFragFlag { FF_ALLOW_FRAG, diff --git a/library/cpp/netliba/socket/udp_recv_packet.h b/library/cpp/netliba/socket/udp_recv_packet.h index a2777fbcbf..a02e4c9b50 100644 --- a/library/cpp/netliba/socket/udp_recv_packet.h +++ b/library/cpp/netliba/socket/udp_recv_packet.h @@ -7,7 +7,7 @@ #include "allocator.h" namespace NNetlibaSocket { - enum { UDP_MAX_PACKET_SIZE = 8900 }; + constexpr int UDP_MAX_PACKET_SIZE = 8900; class TUdpHostRecvBufAlloc; struct TUdpRecvPacket: public TWithCustomAllocator { |