[comp.protocols.tcp-ip] ftp hash marks in binary mode

mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) (06/17/88)

If I'm transferring a file of length x*1024 bytes in BINARY mode in
ftp, how do I calculate the number of hash marks that hash mode should
print?  (I know that in ASCII mode, I should see ceiling(x) hash marks.)

Thanks,
Mike Khaw
-- 
internet: mkhaw@teknowledge.arpa
uucp:	  {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge-vaxc.arpa
hardcopy: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303

hrp@fermi.CRAY.COM (Hal Peterson) (06/24/88)

This is a bug in the FTP client in both 4.2BSD and 4.3BSD.  The code
does not allow for the possibility of a read() returning less than a
full buffer, which happens all of the time with a TCP socket,
especially over a busy long-haul net.  You get a hash mark for every
successful read rather than for every BUFSIZ bytes transferred, and
since the size of every read is unpredictable, there is no way to
determine how many bytes you have transferred from the number of hash
marks you have seen.

--
Hal Peterson / Cray Research / 1440 Northland Dr. / Mendota Hts, MN  55120
hrp%hall.CRAY.COM@umn-rei-uc.ARPA	ihnp4!cray!hrp	    (612) 681-3145