Crate zmodem2

Crate zmodem2 

Source
Expand description

ZMODEM file transfer protocol crate. zmodem2::receive and zmodem2::send provide a synchronous and sequential API for sending and receiving files with the ZMODEM protocol. Each step corresponds to a single ZMODEM frame transaction, and the state between the calls is kept in a zmodem2::State instance.

The usage can be described in the high-level with the following flow:

  1. Create zmodem2::State.
  2. Call either zmodem2::send or zmodem2::receive.
  3. If the returned zmodem2::Stage is not yet zmodem2::Stage::FileEnd, go back to step 2.

Structs§

EncodingIter
An iterator over the variants of Encoding
FrameIter
An iterator over the variants of Frame
Header
Data structure for holding a ZMODEM protocol header, which begins a frame, and is followed optionally by a variable number of subpackets.
PacketIter
An iterator over the variants of Packet
State
Send or receive transmission state

Enums§

Encoding
The ZMODEM protocol frame encoding
Error
Error codes for zmodem2::send and zmodem2::receive
Frame
Frame types
Packet
The ZMODEM protocol subpacket type
Stage

Constants§

XON
ZDLE
ZPAD

Traits§

Read
Read I/O operations
Seek
Seek I/O operations
Write
Write I/O operations

Functions§

finish
Send ZFIN.
read_subpacket
Reads and unescapes a ZMODEM protocol subpacket.
read_zpad
Skips (ZPAD, [ZPAD,] ZDLE) sequence.
receive
Receives a file using the ZMODEM file transfer protocol.
send
Sends a file using the ZMODEM file transfer protocol.
write_subpacket
Writes a subpacket.

Type Aliases§

Buffer
Staging and temporal storage for incoming and outgoing frames