text
stringlengths
0
99.6k
Chapter 8 ZMODEM Protocol 21
9. SSSSTTTTRRRREEEEAAAAMMMMIIIINNNNGGGG TTTTEEEECCCCHHHHNNNNIIIIQQQQUUUUEEEESSSS //// EEEERRRRRRRROOOORRRR RRRREEEECCCCOOOOVVVVEEEERRRRYYYY
It is a fact of life that no single method of streaming is applicable
to a majority of today's computing and telecommunications
environments. ZMODEM provides several data streaming methods
selected according to the limitations of the sending environment,
receiving environment, and transmission channel(s).
9.1 FFFFuuuullllllll SSSSttttrrrreeeeaaaammmmiiiinnnngggg wwwwiiiitttthhhh SSSSaaaammmmpppplllliiiinnnngggg
If the receiver can overlap serial I/O with disk I/O, and if the
sender can sample the reverse channel for the presence of data
without having to wait, full streaming can be used with no AAAAttttttttnnnn
sequence required. The sender begins data transmission with a ZZZZDDDDAAAATTTTAAAA
header and continuous ZZZZCCCCRRRRCCCCGGGG data subpackets. When the receiver
detects an error, it executes the AAAAttttttttnnnn sequence and then sends a
ZZZZRRRRPPPPOOOOSSSS header with the correct position within the file.
At the end of each transmitted data subpacket, the sender checks for
the presence of an error header from the receiver. To do this, the
sender samples the reverse data stream for the presence of either a
ZPAD or CAN character.[1] Flow control characters (if present) are
acted upon.
Other characters (indicating line noise) increment a counter which is
reset whenever the sender waits for a header from the receiver. If
the counter overflows, the sender sends the next data subpacket as
ZCRCW, and waits for a response.
ZPAD indicates some sort of error header from the receiver. A CAN
suggests the user is attempting to "stop the bubble machine" by
keyboarding CAN characters. If one of these characters is seen, an
empty ZCRCE data subpacket is sent. Normally, the receiver will have
sent an ZRPOS or other error header, which will force the sender to
resume transmission at a different address, or take other action. In
the unlikely event the ZPAD or CAN character was spurious, the
receiver will time out and send a ZRPOS header.[2]
Then the receiver's response header is read and acted upon.[3]
__________
1. The call to rdchk() in sssszzzz....cccc performs this function.
2. The obvious choice of ZCRCW packet, which would trigger an ZACK from
the receiver, is not used because multiple in transit frames could
result if the channel has a long propagation delay.
3. The call to getinsync() in sssszzzz....cccc performs this function.
Chapter 9 Rev 10-27-87 Typeset 10-27-87 21
Chapter 9 ZMODEM Protocol 22
A ZZZZRRRRPPPPOOOOSSSS header resets the sender's file offset to the correct
position. If possible, the sender should purge its output buffers
and/or networks of all unprocessed output data, to minimize the
amount of unwanted data the receiver must discard before receiving
data starting at the correct file offset. The next transmitted data
frame should be a ZCRCW frame followed by a wait to guarantee
complete flushing of the network's memory.
If the receiver gets a ZZZZAAAACCCCKKKK header with an address that disagrees
with the sender address, it is ignored, and the sender waits for
another header. A ZZZZFFFFIIIINNNN, ZZZZAAAABBBBOOOORRRRTTTT, or TTTTIIIIMMMMEEEEOOOOUUUUTTTT terminates the session; a
ZZZZSSSSKKKKIIIIPPPP terminates the processing of this file.
The reverse channel is then sampled for the presence of another
header from the receiver.[4] if one is detected, the getinsync()
function is again called to read another error header. Otherwise,
transmission resumes at the (possibly reset) file offset with a ZZZZDDDDAAAATTTTAAAA
header followed by data subpackets.
9.1.1 WWWWiiiinnnnddddoooowwww MMMMaaaannnnaaaaggggeeeemmmmeeeennnntttt
When sending data through a network, some nodes of the network store
data while it is transferred to the receiver. 7000 bytes and more of
transient storage have been observed. Such a large amount of storage
causes the transmitter to "get ahead" of the reciever. This can be
fatal with MEGAlink and other protocols that depend on timely
notification of errors from the receiver. This condition is not