util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name        = "@isayme/go-xlan"
	Version     = "unknown"
	BuildTime   = "unknown"
	GitRevision = "unknown"
)

version info

Functions

func Copy

func Copy(dst io.Writer, src io.Reader) (written int64, err error)

Copy copy with default buf

func PrintVersion

func PrintVersion()

PrintVersion print version

func Proxy

func Proxy(client, server net.Conn)

func UUID

func UUID() string

Types

type TimeoutConn

type TimeoutConn struct {
	net.Conn
	// contains filtered or unexported fields
}

TimeoutConn net.Conn with Read/Write timeout. from https://qiita.com/kwi/items/b38d6273624ad3f6ae79

func NewTimeoutConn

func NewTimeoutConn(conn net.Conn, timeout time.Duration) *TimeoutConn

NewTimeoutConn create timeout conn

func (*TimeoutConn) Read

func (c *TimeoutConn) Read(p []byte) (n int, err error)

func (*TimeoutConn) Write

func (c *TimeoutConn) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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