2 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
10 changed files with 36 additions and 8 deletions
-7
View File
@@ -1,7 +0,0 @@
#pragma once
#include <cstdint>
// Fixed-width unsigned integers
using u8 = std::uint8_t;
using u32 = std::uint32_t;
using u64 = std::uint64_t;
+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;
@@ -1,5 +1,6 @@
#pragma once
#include <boost/asio/io_context.hpp>
// IO Contextct
// IO Context
using IoContext = boost::asio::io_context;
@@ -1,4 +1,5 @@
#pragma once
#include <boost/asio/ip/tcp.hpp>
// TCP
@@ -1,4 +1,5 @@
#pragma once
#include <boost/asio/steady_timer.hpp>
// Timers
@@ -1,4 +1,5 @@
#pragma once
#include <boost/system/error_code.hpp>
// Error handling