0

I want to know how I can send or recieve data over internet to/from a computer in subnet (this is specially in context to PPP users bcoz getting static IP is not so much in practice).

I actually want to create an application which can transfer file between 2 specific computer in WAN.

so what are things I need to know about to do the same..(ex. PRESENT IP or MAC ADDRESS etc..)

PROGRAMATICAL EXPLANATION ALTHOUGH PREFFERED,BUT IS NOT NECCESARY...

perilbrain
  • 7,961
  • 2
  • 27
  • 35

6 Answers6

2

FTP?

Colin Pickard
  • 45,724
  • 13
  • 98
  • 148
2

There is a vast torrent of useful results in google, I seriously suggest to google before you ask here.

For instance, have a look at the top result: http://www.devarticles.com/c/a/C-Sharp/Network-Programming-in-C-sharp/

Apart from that, FTP, as suggested by Colin, may be what you're looking for. If you're new to using FTP in C# have a look at http://www.google.com/search?q=c%23+ftp

mafu
  • 31,798
  • 42
  • 154
  • 247
1

Put the information on a public IP server, so both computers keep polling if there is new data and send / download that data as needed. A single text file can hold necessary flags such as paths and other info you need.

server just need to be a web server, which means IIS or similar should be installed.

Melgarejo
  • 11
  • 1
0

I'm thinking part of your question has to do with one of the computers not having a static IP address. If the two computers, A & B, don't know each others IP address, then an alternative is to use a server. Either A can store the information on the server to be picked up by B, or A can register his current IP address on the server for B to lookup and then connect to A, assuming firewalls don't interfere. Another scheme is that A and B can simultaneously connect to the server, and the server can relay data between the two.

Of course, all of this communication would be done using techniques such as those suggested by mafutrct and Colin.

Greg Graham
  • 484
  • 4
  • 11
0

This question sounds to me like the difficulties of NAT Traversal and trying to establish peer-to-peer connectivity over the Internet. I stumbled on this question researching the best way to set up Internet connectivity to a device that is sitting behind a firewall. I am assuming that the device behind the firewall has to initiate the connection, that a Internet server application (on a Public IP address) to at least manage the initiation of the connection is required, and the Internet server application may also have to act as a relay if the difficulties of NAT is not able to be traversed.

http://en.wikipedia.org/wiki/NAT_traversal

http://en.wikipedia.org/wiki/Peer-to-peer

A good example of this is LogMeIn. Where the application is installed on the computer that needs to be accessible over the Internet, that application communicates with the LogMeIn Internet servers, you can establish a connection to that computer either by initiating through the LogMeIn servers and connecting peer-to-peer over port 80/443 using NAT Traversal (this would be establishing a peer-to-peer connection) or by initiating through the LogMeIn server and the LogMeIn server acting as a relay if peer-to-peer is unable to be established.

Please note; you must have an application (something running) on both ends of the connection on the Internet, there is no other way. Just like FTP that was mentioned earlier (FTP Client, FTP Server)... but in this case it is peer-to-peer (basically you are writing your own Client and Server... or if you have to use a relay... Client--Relay--Server

http://en.wikipedia.org/wiki/LogMeIn

"The service connects the remote desktop and the local computer using SSL over TCP or UDP and utilizing NAT traversal techniques to achieve peer-to-peer connectivity when available."

The part I don't know is can the relay go in both directions; and I am figuring the device behind the firewall must have to constantly manage the open connection to the Internet Server that is the relay. Those are the questions I am wrestling with now.

Also, you may want to check out this post. C# byte streams through TCP

Community
  • 1
  • 1
petegordon
  • 339
  • 1
  • 9
0

From that time, till this date I have encounter so many problems with these four kinds of NAT that basically without an external server you cant do anything. This is because, one computer can never find where the other one is located as suggested in the pic.

The Communication Mechanism

Here PC 'A' will never come to know about the port that corresponds to PC 'B' on R2B without an external server.Even more, if somehow u come to know about the ports you are still in a situation that the router wont allow you to access it if the request hasn't been made for your IP.

perilbrain
  • 7,961
  • 2
  • 27
  • 35