Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTftp

中文

🚀 Quick Start

  • TFTP Server
var tftp = new TftpServer(69);
tftp.LogRawHandler = (info) =>
{
    Console.WriteLine(info);
};
tftp.TransferFileCompletedHandler = info =>
{
    Console.WriteLine(info);
};
tftp.InternalExceptionHandler = (string? message, Exception exception) =>
{
    Console.WriteLine($"Internal Exception, Message:{message}, {exception.Message}, StackTrace:{exception.StackTrace}");
};
tftp.Start();
  • TFTP Client
var tftp = new TftpClient("127.0.0.1", 69);
tftp.LogRawHandler = (info) =>
{
    Console.WriteLine(info);
};
tftp.TransferFileCompletedHandler = info =>
{
    Console.WriteLine(info);
};
tftp.InternalExceptionHandler = (string? message, Exception exception) =>
{
    Console.WriteLine($"Internal Exception, Message:{message}, {exception.Message}, StackTrace:{exception.StackTrace}");
};
var progress = new Progress<ProgressValue>();
progress.ProgressChanged += Progress_ProgressChanged;
tftp.Put("1.pdf", new Option(512, 5), progress);
var bytes = tftp.Get("1.pdf", new Option(512, 5));

About

Tftp Client and Server

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages