Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can a C# app easily communicate and transfer files on a network?

How can a C# app easily communicate with an instance of itself present on another computer, which is on the same network, and transfer files and data?

Assuming the computers on the network have fixed local IP addresses, and they each know each others IPs. Would there also be a way to communicate if the IPs are unknown? based on some discovery protocol?

I heard the "Bonjour" service from Apple was a good protocol. Can we communicate via it from our Windows apps? Or do you have to use "sockets". I'm primarily looking for libraries or sample code that can fulfill my need easily, I don't want to develop my own TCP-based protocol or anything hardcore!

like image 462
Robin Rodricks Avatar asked Aug 09 '09 09:08

Robin Rodricks


People also ask

How AC works simple explanation?

Air conditioning units work by removing the warm air from inside your home and pumping it outside, while releasing the cool air back into the room, reducing the temperature. When liquid becomes gas, it absorbs heat, and in principle, this is how they function.

Can I recharge my car AC myself?

Topping off a car ac system can usually put you back in the deep freeze. That's a job you can do yourself if your vehicle was made after 1993 and is filled with R-134a refrigerant (check the label under the hood or the specifications section of your owner's manual to be sure).


1 Answers

You can use System.Net.Sockets class to communicate and it have a method for sending file Socket.SendFile.

Update:
this is a good example for file sharing and sending file from C# help

like image 69
ecleel Avatar answered Oct 12 '22 22:10

ecleel