[net.lan] why can

libes@nbs-amrf.UUCP (Don Libes) (11/03/85)

After opening a TCP socket and doing a large number of successful reads and
writes (I always check the return value of write), write suddenly reports
that it has only written a partial buffer.  

I am wondering if this is a flow-control problem in that the writer is
getting too far ahead of the reader.  I would have expected the write to
block just like a pipe.  If this is the problem, is there some option I
should set or am I supposed to handle flow-control myself on top of TCP?

I'm grasping at straws, however and don't really think that's the problem.
So anyway, what are the possible reasons for write returning a size that is
positive but less than the requested size.  (Oh, and yes, I'm sure that
the process at the other end is still alive and didn't close the socket.)

Don Libes       {seismo,umcp-cs}!nbs-amrf!libes