Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6574291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:14:34+00:00 2026-05-25T15:14:34+00:00

I am working with a 3rd party device which opens a tcp port that

  • 0

I am working with a 3rd party device which opens a tcp port that only allows one connection at a time. If my app connects to the port, all other connections are denied.

I’d like to find an app that basically connects to this port, then allows others to connect to it on a different port.
Any data sent out of the device’s port is then rebroadcast to any connected client.

I know how to write such an app, but it seems like it would be something someone else has already thought off and written it & shared, and I could avoid taking the time to write it.

basicaly code would be:

1) start a tcp socket server, binding to TO_PORT (clients connect to this)
2) connect as a client to DEVICE_IP:DEVICE_PORT
3) when data is read into a buffer from DEVICE_IP:DEVICE_PORT, the buffer content is resent to each connected client.
4) everything else that makes it a stable, working program.

This is for windows, and I’d prefer it not require a java install.

My google skills have failed me.

Anyone know of such an app?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:14:34+00:00Added an answer on May 25, 2026 at 3:14 pm

    Guess I’ll answer my own question.

    I implemented the solution my self.

    Key points to my solution:

    A class named IPClient which wraps up a TcpClient instance, uses async model of calling TcpClient.BeginConnect, BeginRead, etc. It has a Timer used for reconnecting if it loses connection.
    This is the class that connects to the device.

    It’s public interface would look something like this:

    public class IPClient{
    
        public event EventHandler<MyConnectedArgs> Connected;   
        public event EventHandler<MyDisconnectedArgs>Disconnected;
        public event EventHandler<MyDataReceivedArgs> DataReceived;
    
        public bool Connect(string address, int port){...}
        public bool Disconnect() {...}
      }    
    

    To open the port that would allow other clients to connect, I used this library: http://codeproject.com/KB/IP/BasicTcpServer.aspx and modified it a bit.

    It’s job was to open a port, accept connections, and do the following:

    1. in the Connected handler, start the listening port
    2. in the Disconnected handler, stop the listening port
    3. in the DataReceived handler, broadcast the data to any connected clients.

    I’ll leave out the rest of the boring details, but say it wasn’t “too hard”, and eventually I just had to roll my own.

    command line usage: myapp.exe remote_addr remote_port listen_port

    psuedocode/main idea of my program main:

    static int Main(string[] args){
    
      //SetConsoleCtrlHandler(my callback re: ctrl+C,etc)
    
      //get command line params
    
      var ipClient = new IPClient();
      var myprovider = MyTcpServiceProvider();
      var server = new TcpServer(myProvider, listenPort);
    
      ipClient.Connected += (sender, e) => server.Start();
      ipClient.Disconnected += (sender,e) => server.Stop();
      ipClient.DataReceived += (sender,e)=> provider.BroadcastToClients(e.Data);
    
      ipClient.Connect(remoteAddress,  remotePort);
    
      //wait for Ctrl+C or program exit
      //shutdown code,etc
      return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an interface with a 3rd party app that basically needs to
I am working on a web app which makes use of a 3rd party
Working on an ecommerce site which will be integrated with a 3rd party vendor--that
I am working on a 3rd party application that allows plugins to be written
I'm working on a .NET app that calls 3rd party web services over the
We are working with a 3rd party PHP engine that gets regular updates. The
The iPhone app that I am working on requires GET calls to a 3rd
I am working with a 3rd party that wants to send info via url
I am working on a php web application which involves calls to 3rd party
In the software project I'm working on, we use certain 3rd party libraries which,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.