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

RFC 2347 Options Extension #35

Closed Sharon1Levy closed 1 year ago

Sharon1Levy commented 2 years ago

Hi,

i didn't quite understand how to define additional options to a transfer. as I saw in the code, the TransferOption class is internal. I didn't saw a UnitTest which send\receive data with with additional options. How do i use this capability.

Thanks

Callisto82 commented 2 years ago

Hi, to use TFTP options, just set the appropriate properties on the ITftpTransfer instance before calling ITftpTransfer.Start().

For example, setting ITftpTransfer.BlockSize will request that block size using the RFC 2347 Option Negotiation mechanism.

Sharon1Levy commented 2 years ago

hi, i wish to add an option with value in the end of the data to send. for example, to add Option - "port" Value - 59 and send it as part of the TFTP message

Callisto82 commented 2 years ago

You cannot send "custom" TFTP options and there is no "TFTP port option" defined in the TFTP standard, sorry.