ft filekind refactor + connection state drafting

This commit is contained in:
2023-01-19 14:17:44 +01:00
parent 9f8f681e18
commit 294a427eb0
7 changed files with 59 additions and 28 deletions

View File

@@ -49,6 +49,17 @@ struct FTInfoSHA1 {
std::vector<uint8_t> toBuffer(void) const;
void fromBuffer(const std::vector<uint8_t>& buffer);
};
std::ostream& operator<<(std::ostream& out, const FTInfoSHA1& v);
// TODO: use
struct FTInfoSHA1v2 {
std::vector<std::string> file_names;
uint64_t file_size {0};
uint32_t chunk_size {128*1024}; // 128KiB for now
std::vector<SHA1Digest> chunks;
std::vector<uint8_t> toBuffer(void) const;
void fromBuffer(const std::vector<uint8_t>& buffer);
};
std::ostream& operator<<(std::ostream& out, const FTInfoSHA1& v);