netx

package
v1.10.6 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(conn net.Conn)

func Copy

func Copy(c1, c2 io.ReadWriteCloser, kvs ...string) (in int64, out int64)

func RemoteAddrString

func RemoteAddrString(c net.Conn) string

func SetReadTimeout

func SetReadTimeout(conn net.Conn, tds ...time.Duration)

func WithCompression

func WithCompression(rwc io.ReadWriteCloser) io.ReadWriteCloser

func WrapReadWriteCloser

func WrapReadWriteCloser(r io.Reader, w io.Writer, closeFn func() error) io.ReadWriteCloser

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func New

func New(c net.Conn, isServer bool) *Conn

func (*Conn) Close

func (c *Conn) Close()

func (*Conn) Session

func (c *Conn) Session() *yamux.Session

type ReadWriteCloser

type ReadWriteCloser struct {
	// contains filtered or unexported fields
}

func (*ReadWriteCloser) Close

func (rwc *ReadWriteCloser) Close() (res error)

func (*ReadWriteCloser) Read

func (rwc *ReadWriteCloser) Read(p []byte) (n int, err error)

func (*ReadWriteCloser) Write

func (rwc *ReadWriteCloser) 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