c# - TCP data forwarding

Posted on 2012-08-20
Last Modified: 2012-08-23
I have a server that accepts requests and data from two different sources (clients or techs) and I would like to be able to pass data between the two. I would like to accomplish this to either pass messages, or ideally in the end pass an rdp request from the techs to the clients. All my attempts thus far have failed and any help pointing me in the right direction would be greatly appreciated.
Question by:ktromp1
    LVL 9

    Accepted Solution

    You are describing a chat-server application, of which there are many coding examples on the web.
    Here is a link to an example of a multithreaded chat server.

    Open in new window

    It is almost exactly what you want. Try that and modify it to your needs
    LVL 24

    Expert Comment

    could you simply tunnel it with we PUTTY ?
    LVL 1

    Author Comment

    I will take a look at your link Orcbighter and let you know how it works.

    @alexey_gusev I could but I would prefer it to be all handled by the application.
    LVL 24

    Expert Comment

    is this example sort of what you are looking for (perhaps with small modifications):

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now