Enum file_protocol::Message [−][src]
pub enum Message { Sync(String), Metadata(String, u32), ReceiveChunk(String, u32, Vec<u8>), ACK(String), NAK(String, Option<Vec<(u32, u32)>>), ReqReceive(u64, String, String, Option<u32>), ReqTransmit(u64, String), SuccessReceive(u64), SuccessTransmit(u64, String, u32, Option<u32>), Failure(u64, String), }
File protocol message types
Variants
Sync(String)
TODO: Decide whether or not to keep this
Metadata(String, u32)
Receiver should prepare a new temporary storage folder with the specified metadata
ReceiveChunk(String, u32, Vec<u8>)
File data chunk message
ACK(String)
Receiver has successfully gotten all data chunks of the requested file
NAK(String, Option<Vec<(u32, u32)>>)
Receiver is missing the specified file data chunks
ReqReceive(u64, String, String, Option<u32>)
(Client Only) Message requesting the recipient to receive the specified file
ReqTransmit(u64, String)
(Client Only) Message requesting the recipient to transmit the specified file
SuccessReceive(u64)
(Server Only) Recipient has successfully processed a request to receive a file
SuccessTransmit(u64, String, u32, Option<u32>)
(Server Only) Recipient has successfully prepared to transmit a file
Failure(u64, String)
(Server Only) The transmit or receive request has failed to be completed
Trait Implementations
impl Debug for Message
[src]
impl Debug for Message
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Message
[src]
impl Clone for Message