Help: 4.2bsd IPC routines/TCP sequence error?

Chris Torek chris at umcp-cs.UUCP
Mon Mar 18 00:28:35 AEST 1985


Try reading a complete line (rather than anywhere from 1 to 68 bytes,
whichever is available first) in your receiver.  "recv(...)" on a TCP
socket is like read() from a pipe or file: it doesn't *have* to return
a complete "record" since there aren't any records at that level.

In other words, if you want to read exactly 68 bytes from a TCP socket,
loop, read()- or recv()ing, until you've got 68 bytes (or an error).
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland



More information about the Comp.unix.wizards mailing list