LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: Data Piping

To: "'Michael McConnell'" <michael@xxxxxxxxxxxxxx>
Subject: RE: Data Piping
Cc: "Lvs users mailing list (E-mail)" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Steve Gonczi <Steve.Gonczi@xxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Nov 2000 09:56:55 -0500
This seems like a multiplexing problem.
 
I assume you will want to de-multiplex at some later point. 
 
(I can not fathom an application that would want to irreversibly mix together a bunch of
independent tcp streams, but perhaps my powers of imagination are lacking).
 
 
The approach would be along these lines:
 
1) Accept all incoming connections
2) Whenever you read() a chunk of bytes from one of them, wrap these bytes into 
your own custom header, which should have at least an ID to signify the original connection where you
received it, possibly a sequence  number, and the length of the chunk.
3) Given the above, you simply write all such chunks preceded by the above header to the output
tcp stream.
4) The recipient can read the above chunks into separate buffers, and decipher the header.
Given that, the messages can now be reassembled into the original streams.
 
cheers,
 
/sG
-----Original Message-----
From: Michael McConnell [mailto:michael@xxxxxxxxxxxxxx]
Sent: Wednesday, November 08, 2000 1:03 AM
To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx; debian-firewall@xxxxxxxxxxxxxxxx
Subject: Data Piping

Ok here goes some crazy idea.
 
What I want to do is accept multiple TCP connections, but yet, PIPE all the DATA into one single TCP connection?
 
TCP---------\
                \
TCP-----------\
                 \
TCP-------------======== TCP
                 /
TCP----------/
 
Hmm, lets see how outlook does with ANSI...
 
 
Theories?
 
Mike
<Prev in Thread] Current Thread [Next in Thread>