Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ulysses!smb From: smb@ulysses.homer.nj.att.com (Steven M. Bellovin) Newsgroups: comp.protocols.tcp-ip Subject: Re: Protocol Design issue Message-ID: <12485@ulysses.homer.nj.att.com> Date: 14 Dec 89 01:36:14 GMT References: <10439@ucsd.Edu> Organization: AT&T Bell Laboratories, Murray Hill Lines: 12 Sending a count followed by the exact number of bytes can work; indeed, that's what Peter Honeyman and I did in uucp's 'e' protocol. A few caveats... First, do everyone a favor and send the count in ASCII. Using htonl() would work, but is only convenient if (a) the receiving machine has ntohl(), and (b) both sides use 32-bit longs. Me -- unless there's a major performance issue, I'd prefer ASCII. The other drawback is that there's no good way to abort the transfer. I suppose you could send an 'urgent' message, but that's difficult to handle sometimes. We wanted to be able to abort in case the size of the file changed between when uucico did the fstat(), and when the file was actually read. Might your application run into similar issues?