5 Commits

Author SHA1 Message Date
Ваше Имя 9ccabcd1eb refactor(common): reorganize type aliases and add application-specific types
Reorganize type aliases into dedicated directories and add application-specific
type definitions for chunk index, file size, frame length, and IDs. Improves
code clarity and type safety.
2025-10-09 23:12:25 +04:00
Ваше Имя aeeb22d351 refactor(aliases): replace std_cstdint with ByteBuffer alias 2025-10-09 15:23:38 +04:00
Ваше Имя a4f103d0c8 feat(boost_asio): add TcpResolver alias for Boost.Asio TCP resolver 2025-10-09 14:38:41 +04:00
Ваше Имя bb99d8d812 feat(aliases): add type aliases for fixed-width integers 2025-10-09 14:35:09 +04:00
Ваше Имя 1e6fecb7bd refactor(aliases): add Boost type aliases 2025-10-09 14:25:54 +04:00
9 changed files with 58 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
#pragma once
#include <cstdint>
#include <vector>
// Alias for raw byte buffer
using ByteBuffer = std::vector<std::uint8_t>;
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include <cstdint>
// Sequential file chunk index
using ChunkIndex = std::uint32_t;
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include <cstdint>
// File total size in bytes
using FileSize = std::uint64_t;
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include <cstdint>
// Wire length prefix type for a single framed message (big-endian on the wire)
using FrameLength = std::uint32_t;
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include <cstdint>
// Client, group, or message ID
using Id = std::uint64_t;
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include <boost/asio/io_context.hpp>
// IO Context
using IoContext = boost::asio::io_context;
@@ -0,0 +1,9 @@
#pragma once
#include <boost/asio/ip/tcp.hpp>
// TCP
using TcpSocket = boost::asio::ip::tcp::socket;
using TcpAcceptor = boost::asio::ip::tcp::acceptor;
using TcpEndpoint = boost::asio::ip::tcp::endpoint;
using TcpResolver = boost::asio::ip::tcp::resolver;
@@ -0,0 +1,6 @@
#pragma once
#include <boost/asio/steady_timer.hpp>
// Timers
using SteadyTimer = boost::asio::steady_timer;
@@ -0,0 +1,6 @@
#pragma once
#include <boost/system/error_code.hpp>
// Error handling
using ErrorCode = boost::system::error_code;