Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_zblklen()</b> - get or set zmodem block length http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_zblklen() - get or set Zmodem block length

   nOldLen := tp_zblklen([nNewLen])

   nNewLen     New block length.

   Returns     Original block length.

   Gets or sets the current Zmodem block length.  This function is only
   valid when called from within the progress function of a Zmodem send.

   tp_szmodem() sets the initial block length based on the baud rate:

       128     75 to 300 baud
       256     600 or 1200 baud
       512     2400 baud
       1024    4800 baud and higher

   If you wish to change it, you should call this function when
   receiving the "start of file" (TXS_SFILE) progress message.  Block
   length may be set from 32 to 1024 bytes.

   There is little reason to change the block length.  It will not
   produce noticeably higher transfer rates, and may slow error
   recovery.  But users are sometimes more impressed to see a transfer
   running at larger block sizes, and this function allows you to make
   them happy.

   Example:

       #include "telepath.ch"

       function Progress(nCode, cFile, nLength, nError)

           do case
           ...
           case nCode == TXS_SFILE
               tp_zblklen(1024)    // Force 1K blocks.
           ...
           endcase

           return 0

See Also: tp_szmodem() File Transfers

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson