[net.unix] pipes and buffers HELP

johnth@batcomputer.UUCP (10/08/86)

I am new to UNIX so this may be a dumb queation but I'll ask anyway.

I am trying to write a program to control the input to and output from
the telnet utility.  A pipe will do half of what I need but I need help
on how to go the whole way.  Here is what I have working:

          keyboard -> telnet -> | -> prog -> screen

What I need is:

          keyboard ->
                      \
                       - prog <-> telnet
                      /
          screen   <-

I have heard of two way pipes and buffers etc but I have no idea how to make 
it all go.  I would appreciate any suggestions and/or good references.

Thanks

John Thurtell    UUCP:    johnth@batcomputer.UUCP
                 ARPA:    Thurtell@cheme.tn.cornell.edu
                 BITNET:  p8tj@cornelld.bitnet