pub enum Vortex {
DownloadPiece(Header, DownloadPiece),
PieceContent(Header, PieceContent),
Reserved(Header),
Close(Header),
Error(Header, Error),
}
Expand description
Vortex Protocol
Vortex is a peer-to-peer (P2P) file transfer protocol using TLV (Tag-Length-Value) format for efficient and flexible data transmission. Designed for reliable and scalable file sharing.
Packet Format: - Packet Identifier (8 bits): Uniquely identifies each packet - Tag (8 bits): Specifies data type in value field - Length (32 bits): Indicates Value field length, up to 4 GiB - Value (variable): Actual data content, maximum 1 GiB
Protocol Format:
-------------------------------------------------------------------------------------------------
| | | | |
| Packet Identifier (8 bits) | Tag (8 bits) | Length (32 bits) | Value (up to 4 GiB) |
| | | | |
-------------------------------------------------------------------------------------------------
For more information, please refer to the Vortex Protocol.
Variants§
DownloadPiece(Header, DownloadPiece)
PieceContent(Header, PieceContent)
Reserved(Header)
Close(Header)
Error(Header, Error)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Vortex
impl RefUnwindSafe for Vortex
impl Send for Vortex
impl Sync for Vortex
impl Unpin for Vortex
impl UnwindSafe for Vortex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more