TFTP server and client library for Golang
Shutdown
call blocks until outstanding transfers are finished: #92Note: This is the last release that is compatible with golang >= 1.13, the next release will require golang >= 1.17. This is due to golang.org/x/net
dependency.
Adds module compatibility. Originally modules was introduced when github.com/pin/tftp
package was already tagged with major version v2. So v2 became incompatible and recommended way to move forward is to cut the new major version just for the sake of module compatibility.
Branch master
will be used to develop v3 for now.
Branch v2
is to keep the head of major version v2.
Note, API-wise v2 and v3 are identical. Also I believe there is no users of v1 in the wild because it had pretty short lifespan long time ago.
So it must be absolutely safe for anyone to move to v3 anytime. I don't think we will see any new v2 subversion therefore.
This package is behind on module Golang train.
Plan is to release v3 version that is fully compatible with Golang modules. For now the plan is to keep v2 an incompatible fully with modules (which is legit case).
So possibly the last TFTP package version before module compatibility changes.
New features:
LocalIP
returns the IP address and port we are servicing the request on.SetBlockSize
option in the client.Backward-compatible with previous release.
New Features (fully backward-compatible):
Seek
in case sender asked to send tsize option and io.Reader
provided to ReadFrom
method satisfy io.Seeker
interface. In many cases (e.g. when os.File
is used as an argument to ReadFrom
) there is no need anymore to explicitly SetSize
using OutgoingTransfer
interface.SetBackoff
method. Implemented by @acdRemoteAddr
method allows retrieving remote peer's IP address and port. It can be particularly useful for logging from inside request handlers. Implemented by @acdProtocol implementation improvements by @acd:
Fixes:
ulimit
to allow more open file descriptors.API was changed significantly to improve efficiency and make the package more aligned with Go coding best practices and make it more cohesive to io
interfaces.
Features and changes:
blksize
, tsize
options)io.ReaderFrom
/ io.WriterTo
based implementation allows minimal memory copying during data transfernetascii
transfer mode supportUse import "gopkg.in/pin/tftp.v1"