On Sun, Mar 1, 2009 at 7:08 PM, Shimon Lebowitz <[email protected]> wrote:
> I once wasted several days trying to get two machines running
> pipes to send a simple message via TCPIP back and forth.
> According to the article I had read (perhaps by Rob? I don't
> really remember) it was supposed to be a piece of cake,
> but I never got it to work, and had to move on to other
> things.

Yes, it should be very simple... I used to present my client and
server on the same 3270 command line, claiming that "we don't need no
GUI to do client/server"

:untested.

PIPE (end \) immcmd s | tolabel . | tcpclient 127.0.0.1 12345 | cons
 \ tcplisten 12345 | take | i: fanin | tcpdata |  cms | elastic | i:

There's blocking options on both tcpclient and tcpdata that ensure
record boundaries remain in place (without adding your own
block/deblock stages).

Have a look at Melinda's "Plumbing the Internet"  The biggest trick is
that you need to spawn a worker thread to handle the connection
(unless you accept doing one thread at a time - in which case you can
just callpipe it). The example I show above is simple in that it is a
one-shot session (the "take" terminates tcplisten after first
connection).

Rob

Reply via email to