0

I know there are several similar questions out there such as this one. I need to set up a connection between two computers and be able to send a large file. Let me explain the problems that I encountered when reading similar posts:

1) lots of them talked about tcp connections. I was able to send data but most of the time I was not able to send large amounts of data.

2) most of the examples where created in local networks. I was able to send data over two different networks over the internet with the tcp examples but I had to open ports on the router and forward them to the computer that I wanted to communicate to.

3) Libraries such as monotorrent or bitsharp where hard to find and I did not find good examples. I where not able to make them work.

so in short I just need to send files from one computer to another computer over the internet and I don't want to open ports on the router nor do any kind of port forwarding. people do not have to open ports on their routers when using limewire for example and they are downloading files from someone else computer. It will be nice if someone can provide me with a short example of how to set up the server and how to send a file to the server with the client code.

Community
  • 1
  • 1
Tono Nam
  • 34,064
  • 78
  • 298
  • 470

1 Answers1

3

The port opening and forwarding problem that you mention is a very real one, and there is no easy work around. Applications like uTorrent use UPnP port mapping and / or NAT-PMP to talk to your router automatically and get it to do the relevant port-mappings "on the fly". Not all routers implement these protocols (and in many cases, users might disallow their use for security reasons), so the web is littered with questions on how to do port forwarding for limewire, uTorrent, etc.

Other than reading up on this, I would recommend that you specify your questions in a bit more detail, e.g.:

I was able to send data but most of the time I was not able to send large amounts of data.

this is a bit too vague for us to guess at what the problem is. What size file were you sending, over what connection, did you get errors, or was it just slow, etc?

Daniel B
  • 2,877
  • 18
  • 18