init ft (no ack or data yet)

This commit is contained in:
2022-10-06 02:24:23 +02:00
parent 41150a0332
commit 6d4ee7de42
4 changed files with 281 additions and 37 deletions

View File

@@ -37,18 +37,23 @@ enum _PacketType : uint8_t {
// - X bytes (file_kind dependent id, differnt sizes)
FT1_REQUEST = 8u,
// TODO: request result negative, speed up not found
// tell the other side you want to start a FT
// TODO: might use id layer instead. with it, it would look similar to friends_ft
// - 1 byte (file_kind)
// - X bytes (file_kind dependent id, differnt sizes)
// - 8 bytes (data size) // TODO: do all file kinds have a size at init?
// - 8 bytes (data size, can be 0 if unknown, BUT files have to be atleast 1 byte)
// - 1 byte (temporary_file_tf_id, for this peer only, technically just a prefix to distinguish between simultainious fts)
FT1_INIT,
// acknowlage init (like an accept)
// like tox ft control continue
// - 1 byte (temporary_file_tf_id)
FT1_INIT_ACK,
// TODO: init deny, speed up non acceptance
// data fragment
// - 1 byte (temporary_file_tf_id)
// - 2 bytes (sequece id)