Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPServerReader ¶
type HTTPServerReader struct { KeepAlivePeriod time.Duration // contains filtered or unexported fields }
func NewHTTPServerReader ¶
func NewHTTPServerReader(addr string, w io.Writer) *HTTPServerReader
func (*HTTPServerReader) Close ¶
func (this *HTTPServerReader) Close() error
func (*HTTPServerReader) ListenAndServe ¶
func (this *HTTPServerReader) ListenAndServe() (err error)
func (*HTTPServerReader) ServeHTTP ¶
func (this *HTTPServerReader) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TCPKeepAliveListener ¶
type TCPKeepAliveListener struct { *net.TCPListener Period time.Duration }
TCPKeepAliveListener sets TCP keep-alive timeouts on accepted connections. It's used by ListenAndServe and ListenAndServeTLS so dead TCP connections (e.g. closing laptop mid-download) eventually go away.
func NewTCPKeepAliveListener ¶
func NewTCPKeepAliveListener(TCPListener *net.TCPListener, Period ...time.Duration) *TCPKeepAliveListener
type TCPServerReader ¶
type TCPServerReader struct { KeepAlivePeriod time.Duration // contains filtered or unexported fields }
func NewTCPServerReader ¶
func NewTCPServerReader(addr string, w io.Writer) *TCPServerReader
func (*TCPServerReader) Close ¶
func (this *TCPServerReader) Close() error
func (*TCPServerReader) ListenAndServe ¶
func (this *TCPServerReader) ListenAndServe() (err error)
type UDPServerReader ¶
type UDPServerReader struct {
// contains filtered or unexported fields
}
func NewUDPServer ¶
func NewUDPServer(addr string, maxBufferSize int16, w io.Writer) *UDPServerReader
func (*UDPServerReader) Close ¶
func (this *UDPServerReader) Close() error
func (*UDPServerReader) ListenAndServe ¶
func (this *UDPServerReader) ListenAndServe() (err error)
Click to show internal directories.
Click to hide internal directories.