Documentation ¶
Overview ¶
Package tftp provides a read-only TFTP server implementation.
ListenAndServe starts a TFTP server with a given address and handler.
log.Fatal(tftp.ListenAndServe("udp4", ":69", fooHandler))
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = func(string, ...interface{}) {}
Debug is called with messages relevant to debugging or tracing the behavior of the TFTP server.
View Source
var Log = func(msg string, args ...interface{}) { log.Printf(msg, args) }
Log is called with messages of general interest.
Functions ¶
func ListenAndServe ¶
ListenAndServe listens on the given address/family and then calls Serve with handler to handle incoming requests.
func Serve ¶
func Serve(l net.PacketConn, handler Handler)
Serve accepts incoming TFTP read requests on the listener l, creating a new service goroutine for each. The service goroutines use handler to get a byte stream and send it to the client.
Types ¶
Click to show internal directories.
Click to hide internal directories.