phase 5: transfer service

This commit is contained in:
2026-04-27 01:21:16 +03:00
parent b5c506cf03
commit 895fee6235
49 changed files with 905 additions and 838 deletions
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include <cstdint>
namespace proto {
constexpr uint16_t TCP_PORT = 8080;
constexpr uint16_t MULTICAST_PORT = 8081;
constexpr char MULTICAST_GROUP[] = "239.0.0.1";
constexpr size_t BUF_SIZE = 65536;
constexpr uint32_t MAX_FILENAME = 4096;
constexpr uint32_t EOF_SENTINEL = 0;
// Wire layout per file:
// [filename_len : uint32_t LE] — 0 == end-of-stream
// [filename : filename_len bytes]
// [file_size : uint64_t LE]
// [file_data : file_size bytes]
}