Reputation: 11198
I need to communicate (in C#) between two (or more) laptop computers that are not on a LAN.
Here is the scenario: A couple of agents (with laptops) go from region to region working in several offices (at the same time).
I need a way for the agents to be able to share and merge files with each other without having to resort to emailing, copying to USB drives and checking-in the files to the central repository.
What will be the best (easiest/secure) way to archive this? Bluetooth, AdHoc Mode, Wifi!
Upvotes: 0
Views: 1108
Reputation: 2497
Since they are not connected to a LAN, I kind of assume they are also not connected to a wifi access point, since if they were they would be connected to a LAN (a WLAN). Wifi ad hoc mode is easy to setup, just configure both interfaces as a computer to computer network, and manually set their IP addresses to something like 192.168.1.1 and 192.168.1.2 with netmask 255.255.255.0. After this, all you need to do is open a socket connection in C# between them, say 192.168.1.1 opens a socket to 192.168.1.2.
For simplicity, you could also install a DHCP server on one of them, and you would then only need to configure the IP address on one machine.
Upvotes: 0
Reputation: 39510
If they're not on a LAN, presumably you can connect them together directly using an Ethernet cable.
Upvotes: 1