At 10:51 PM -0400 6/23/01, Adam Stern wrote:
>Here was what I wanted to do.
>Write a server that listens on a port
>When a client connects, the server connects to another remote server.
>Everything the client says to the initial server gets told to the remote
>server, and everything the remote server says gets told to the initial
>client.
>
>...  I want to get info from two seperate connections at
>the same time, whenever those two connections talk.
>
>I'd like some code examples, or at least a huge hint.  Thank you very
>much.

The best I can do is some concepts:

What you've said above is that the initial server will be in control 
of who's talking and listening (using select()), and further that the 
client only knows that it's talking to the initial server, yes?

Then how about this? Your program (the initial server) could cycle 
with select() between the client and the remote server, telling each 
what the other has just said and then recording the response. The 
successive responses could be recorded in a variable, added to the 
internal data structure of an object, or appended to a file. By being 
the go-between, the initial server would enable the interchange and 
could also intervene under rules triggered by properties of the 
responses.

H?

1;

Reply via email to