TApxProtocol.InitialPosition

TApxProtocol

property InitialPosition : LongInt

The initial file offset for a resumed transfer.

This property applies only to the Zmodem protocol, which support resumed file transfers. For a transfer from scratch, InitialPosition returns zero. For a resumed transfer, InitialPosition returns the offset where the transfer was resumed. This offset should be subtracted from BytesTransferred to obtain the actual number of bytes transferred during the resumed session.

This property is most useful within an OnProtocolStatus event handler. See "Protocol status" in the printed documentation for more information.

The following example shows how to compute the character per second transfer rate in a protocol status routine (note that the same expression is valid whether or not the transfer has been resumed):

CPS := 
 (ApxProtocol.BytesTransferred - ApxProtocol.InitialPosition)
  div (1000 * ApxProtocol.ElapsedMSecs);

See also: BytesTransferred