<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On 18 Apr 2013, at 03:30, Jack Haverty <<a href="mailto:jack@3kitty.org">jack@3kitty.org</a>> wrote:</div><blockquote type="cite"><div><br><span>Randy Rettberg and I, both at BBN, took the TCP/Unix challenge.  We</span><br><span>were both Unix neophytes.  After figuring out what we could (Lion's</span><br><span>notes were a great help), we still didn't see any clean way to</span><br><span>construct the common kinds of network programs inside the Unix</span><br><span>environment.  In particular, it didn't seem possible to write a</span><br><span>program that could serve a duplex information flow, where you couldn't</span><br><span>predict from which direction the next piece of data would come.  I.E.,</span><br><span>when the program was ready to go into an idle state and wait for more</span><br><span>work to do, you could issue a "read" call to the kernel, specifying a</span><br><span>file descriptor, and it would hang until data was available from that</span><br><span>"file".  But if you picked the "wrong" fd to wait on for input, your</span><br><span>program would wait forever.  How would a "telnet" program, for</span><br><span>example, know whether its local human user would type another</span><br><span>character next, or its remote partner across the net would send the</span><br><span>next character for output to that user terminal.   There may have been</span><br><span>a way to do this in Unix of the era, but we neophytes couldn't see it.</span><br><span> Networking didn't seem to fit the Unix "concatenation of pipes"</span><br><span>paradigm where input flows unidirectionally to output.</span><br></div></blockquote><br><div>Thanks for the interesting memories.</div><div><br></div><div>The bit I quoted above reminded me of a bit of folklore from that era: for full-duplex comms, fork a child, and do opposing unidirectional comms in the parent and child processes. For example, <span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><a href="http://minnie.tuhs.org/cgi-bin/utree.pl?file=pdp11v/usr/src/cmd/net/net.c">http://minnie.tuhs.org/cgi-bin/utree.pl?file=pdp11v/usr/src/cmd/net/net.c</a></span></div><div><div style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">I can't remember now what was the usual example of a program that did this; "tip" perhaps, or is that too recent? I also don't know how much the trick was still used as networking became popular.</div><div style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><br></div><div style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><div>Tony.</div>--<div>f.anthony.n.finch  <<a href="mailto:dot@dotat.at">dot@dotat.at</a>>  <a href="http://dotat.at/">http://dotat.at/</a></div><div><br></div></div></div></body></html>