async-tftp-0.4.0 has been yanked.
async-tftp
Executor agnostic async TFTP implementation, written with smol building blocks. Currently it implements only server side.
The following RFCs are implemented:
- RFC 1350 - The TFTP Protocol (Revision 2).
- RFC 2347 - TFTP Option Extension.
- RFC 2348 - TFTP Blocksize Option.
- RFC 2349 - TFTP Timeout Interval and Transfer Size Options.
- RFC 7440 - TFTP Windowsize Option.
Features:
- Async implementation.
- Works with any runtime/executor.
- Serve read (RRQ) and write (WRQ) requests.
- Unlimited transfer file size (block number roll-over).
- You can set non-standard reply
timeout. This is useful for faster file transfer in unstable environments. - You can set block size limit. This is useful if you are accessing client through a VPN.
- You can implement your own
Handlerfor more advance cases than just serving a directory. Checktftpd-targz.rsfor an example.
Example
use TftpServerBuilder;
use Result;
// or any other runtime/executor
async
Add in Cargo.toml:
[]
= "0.3"
# or any other runtime/executor
= { = "1", = ["rt-multi-thread", "macros"] }
Running examples with cargo
There are some examples included with this crate. You can run them from a source checkout with cargo: