Callisto82 / tftp.net

Implements the TFTP (Trivial File Transfer) protocol (client/server) in an easy-to-use C#/.NET library.
Microsoft Public License
80 stars 38 forks source link

No Documentation #32

Closed jdrescher2006 closed 2 years ago

jdrescher2006 commented 2 years ago

This library looks good, though I have no idea how to use it because there is no documentation at all. The examples don't give a clue on how to use the upload function. I searched for hours but could not find anything, where to find the documentaion?

Callisto82 commented 2 years ago

Hi! There is an example for downloading a file. Uploading basically works the same. Here's a shortened version:

var client = new TftpClient("localhost");
var transfer = client.Upload("filename-on-server.pdf");

Stream fileToUpload = File.OpenRead(@"C:\temp\file-to-upload.pdf");
transfer.Start(fileToUpload);

Check the documentation for file downloads for more details: https://github.com/Callisto82/tftp.net/blob/master/Tftp.Net.SampleClient/Program.cs

Does that help you or do you need more information?