This is actually a programming problem, but comp.os.linux.networking is
always so helpful...
I have a pair of tcp-connections (sockets s1/s2):
[A] <==> ---tcp_s1-- [ HOST ] --tcp_s2--- <==> [B]
So I am managing 2 connections to allow communication between A and B.
They must be able to read/write to each other at the same time.
How should I arrange my read/write loop at [HOST] to forward data back and
forth efficiently? Also, in the future [HOST] may be doing this between
multiple host (so it'll be a center "hub", take this under consideration
when presenting some thoughts (pseudo code'd be appreciated).
Thanks very much!