data relay - intermediary program

nem33

Member
Joined
Mar 17, 2003
Messages
23
Hello,
Im trying to figure out the best way to do this..
Situation:
A program on my computer normally connects directly to a server somewhere on the internet.
Goal: Make the client program connect instead to my program, and then relay all the data that it sends to the outside server and vice versa.

I hope that makes sense. So far Ive got the code working to accept the connection from the client program(Ive also made the client program connect to my program instead of the outside server) Im wondering how best to relay the data from the client to the outside server properly.

Ive got 2 seperate network streams for writing and reading data for both the client program and the outside server. I want to be able to read the data as it travels back and forth while keeping it intact for relaying properly. Ive been experimenting with buffered streams etc.. but cant quite get it to work. Any help is appreciated. Thank you.
btw: Im using vb.net...not that it matters anymore :-\
 
Last edited by a moderator:
Back
Top