#[repr(u8)]pub enum Tag {
DownloadPiece = 0,
PieceContent = 1,
DownloadPersistentPiece = 2,
PersistentPieceContent = 3,
DownloadPersistentCachePiece = 4,
PersistentCachePieceContent = 5,
DownloadCachePiece = 6,
CachePieceContent = 7,
Reserved(u8),
Close = 254,
Error = 255,
}Expand description
Tag Definitions
Variants§
DownloadPiece = 0
Download the content of a piece from a peer. It is composed of {Task ID}{Piece ID},
where the Task ID is a SHA-256 value and the Piece ID is a number.
PieceContent = 1
The content of a piece, with a maximum size of 4 GiB per piece.
DownloadPersistentPiece = 2
Download the content of a persistent piece from a peer. It is composed of {Task ID}{Piece ID},
where the Task ID is a SHA-256 value and the Piece ID is a number.
PersistentPieceContent = 3
The content of a persistent piece, with a maximum size of 4 GiB per piece.
DownloadPersistentCachePiece = 4
Download the content of a persistent cache piece from a peer. It is composed of {Task ID}{Piece ID},
where the Task ID is a SHA-256 value and the Piece ID is a number.
PersistentCachePieceContent = 5
The content of a persistent cache piece, with a maximum size of 4 GiB per piece.
DownloadCachePiece = 6
Download the content of a cache piece from a peer. It is composed of {Task ID}{Piece ID},
where the Task ID is a SHA-256 value and the Piece ID is a number.
CachePieceContent = 7
The content of a cache piece, with a maximum size of 4 GiB per piece.
Reserved(u8)
Reserved for future use, for tags 6-254.
Close = 254
Close the connection. If server or client receives this tag, it will close the connection.
Error = 255
Error message.