Search code examples
c#visual-studiotcpudpremote-access

Is there an actual sample of proof of concept or tutorial how to make 2 computers connect together to transmit audio?


I worked for week and read tons of pages and tried them, but I think I'm very unlucky. What I want to do, it to have a permanent application on a computer which is stable and inside a subnet.

The second computer, will be a notebook going anywhere and connecting to whatever network on the road... even a mobile shared connection.

The objective is that it will take the notebook (full system sound) and transmit it to the permanent computer. Then the permanent computer will take another sound and send it back to the first computer on a second sound card. So it's full duplex. This part work perfectly already on local network. I need the link between the computers to work not locally.

I don't even premashed answers if you don't want to. If I ask help, it's because I'm out of solutions. After hundreds of pages read, Google was not my friend. I don't know where to look anymore.

The full objective is to do remote interviews for our radio station.

We Tried all kind of TCP, UDP, Routing, Ports mix... But I shouldn't need does, since Anydesk and Team Viewer don't need this. They use Middle server in between. I can't find any sample about that. I'm open to make a middle server. PHP, HEROKU or Windows.

I don't want to use stuff like ICECast because they have to much latency. It's built for multiple connections. What I do is for PEER TO PEER, 1 to 1, connection only. Also, I have other thing my app does which is to open and close some sound volumes on the main computer and start some stats software. Which is why I want something home made.

If I can be put on the right track, that would be awesome.

Thank you a lot in advance for your help.


Solution

    1. The application on the 'permanent' computer should be of the type 'listener', a server application.
    2. The other application, on the mobile computer, should be a 'client' that connects to the server application.
    3. To make it possible to connect between them over the internet, configure port forwarding on your router. This will allow to pass TCP / UDP communication from the WAN side to the internal LAN IP address that the listener is running on. An important consideration to make here regarding is the port you choose for the port forwarding. Often, ISP block certain ports. So, look up which ports they block, and don't use one of those for the WAN side.
    4. The client application should be able to connect to your WAN address on the port you have configured in the router.

    Note: this is a starting point. It is wise to consider to encryption or even a VPN for the communication.