K
K
KraysentLight2018-06-04 18:27:36
Computer networks
KraysentLight, 2018-06-04 18:27:36

How to transfer data from one computer to another if they are on different networks - c#?

Let me have two computers:
- one in the local network with a "white" ip 12.34.56.78 and has a "gray" ip 192.168.0.2
- the other in the local network with a "white" ip 78.56.34.12 and has a "gray" ip 192.168. 0.3
The task is to transfer an array of bytes from one computer to another using c#. I found examples of TCP / UDP chats only those that work inside the local network and no more.
PS I read about port forwarding that you need to configure the router itself. Then another question follows from this - why, when downloading something using a torrent, you do not need to configure the router? The transfer of the file itself happens peer-to-peer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pfg21, 2018-06-04
@KraysentLight

On one of the routers you do port forwarding.
Either router settings, or upnp, nat-pmp, etc.
In torrents and others like them, automatic port forwarding protocols have been built in for a very long time

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question