util

package
v0.0.0-...-e27f806 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyWithIdleTimeout

func CopyWithIdleTimeout(dst net.Conn, src net.Conn, timeout int64) (written int64, err error)

func ListenAndServe

func ListenAndServe(listen string, handler Handler, logger log15.Logger)

func ManyGlob

func ManyGlob(globs []string, str string) (matched bool)

func Proxy

func Proxy(srvConn, cliConn *net.TCPConn, timeout int64)

func ReadBufferedBytes

func ReadBufferedBytes(rd *bufio.Reader) (buf []byte, err error)

func SetDeadlineSeconds

func SetDeadlineSeconds(conn net.Conn, seconds int64) (err error)

func SetReadDeadlineSeconds

func SetReadDeadlineSeconds(conn net.Conn, seconds int64) (err error)

func SetWriteDeadlineSeconds

func SetWriteDeadlineSeconds(conn net.Conn, seconds int64) (err error)

Types

type Handler

type Handler interface {
	HandleConn(*net.TCPConn)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL