Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ccabcd1eb | |||
| aeeb22d351 | |||
| a4f103d0c8 | |||
| bb99d8d812 | |||
| 1e6fecb7bd |
@@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
// Alias for raw byte buffer
|
||||||
|
using ByteBuffer = std::vector<std::uint8_t>;
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
// Sequential file chunk index
|
||||||
|
using ChunkIndex = std::uint32_t;
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
// File total size in bytes
|
||||||
|
using FileSize = std::uint64_t;
|
||||||
@@ -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;
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
// Client, group, or message ID
|
||||||
|
using Id = std::uint64_t;
|
||||||
@@ -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;
|
||||||
Reference in New Issue
Block a user