Click here to Skip to main content
Click here to Skip to main content

Socket stream redirection using .NET remoting

, 4 May 2004
Rate this:
Please Sign up or sign in to vote.
Redirecting socket stream over HTTP channel with .NET remoting.

Sample Image - TCP2HTTP.jpg


Since this is my first uploaded project, I will be quite brief.

This simple program uses .NET remoting built in HTTP channel to establish a two-way communication channel between client and server endpoints which is adequate for firewalled and proxy environments.

Basically, at the server end, TCP2HTTPActivator registers TCP2HTTPServer which is a MarshalByRefObject class that exposes a few methods for sending and receiving socket data. When a client connects to the server, it requests a connection to a particular TCP port. Server object opens a connection to the local port and serves as a proxy between client and server sides.

At the client end, TCP2HTTPClient starts listening at a predetermined port which is used for redirecting the TCP socket data transfer over HTTP channel. When an application connects locally to a defined port, TCP2HTTPClient feeds the data to the server and backwards via sendTCPStream and receiveTCPStream methods.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
Croatia Croatia
No Biography provided

Comments and Discussions

QuestionHas anyone figured out how to get this to work? Pinmemberskirby5521-Jun-07 7:32 
QuestionHow to run the demo? Pinmemberlangdeng12-Oct-05 15:25 
Generalseperation Pinmemberseer_tenedos224-Feb-05 16:11 
What i want to do is runt he remoting server at home that conencts to the local tcp server on say port 6689. The remoting server would be on port 80.
The client would need to use ntlm authentication to a proxy server at work and then would map the local port 90 to the port 6689 on my server but all traffic must be over port 80. Is this what the sample above does? I could not seem to get the above sample to work in this manner. could you provide a example that is a little clearer?
GeneralRe: seperation PinmemberNavise26-Feb-05 12:52 
GeneralMore details PinmemberMichael A. Barnhart18-May-04 1:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150224.1 | Last Updated 5 May 2004
Article Copyright 2004 by Navise
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid