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.
This commit is contained in:
Ваше Имя
2025-10-09 23:12:25 +04:00
parent aeeb22d351
commit 9ccabcd1eb
9 changed files with 30 additions and 1 deletions
@@ -1,4 +1,5 @@
#pragma once
#include <cstdint>
#include <vector>
+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