Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeout = errors.New("timeout")
ErrTimeout is returned by the packetReader when it times out reading a packet.
View Source
var ZeroConn = newZeroConn()
ZeroConn can be used as a placeholder if otherwise not known.
Functions ¶
func ListenAndServe ¶
Types ¶
type Handler ¶
type Handler interface { ReadFile(c Conn, filename string) (ReadCloser, error) WriteFile(c Conn, filename string) (WriteCloser, error) }
Handler is the interface a consumer of this library needs to implement to be able to serve TFTP requests.
type ReadCloser ¶
type ReadCloser interface { io.ReadCloser }
ReadCloser is what the Handler needs to implement to serve TFTP read requests.
type WriteCloser ¶
type WriteCloser interface { io.WriteCloser }
WriteCloser is what the Handler needs to implement to serve TFTP write requests.
Click to show internal directories.
Click to hide internal directories.