utilsConn

package
v0.0.0-...-7ec6a99 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(rwc io.ReadWriteCloser) io.ReadWriteCloser

func GetBuf

func GetBuf(size int) []byte

func GetSnappyReader

func GetSnappyReader(r io.Reader) *snappy.Reader

func GetSnappyWriter

func GetSnappyWriter(w io.Writer) *snappy.Writer

func Join

func Join(a io.ReadWriteCloser, b io.ReadWriteCloser) (toBCount int64, toACount int64)

Join two io.ReadWriteCloser and do some operations.

func NewWrapReadWriteCloserConn

func NewWrapReadWriteCloserConn(rwc io.ReadWriteCloser, hideConn net.Conn) net.Conn

func PutBuf

func PutBuf(buf []byte)

func PutSnappyReader

func PutSnappyReader(sr *snappy.Reader)

func PutSnappyWriter

func PutSnappyWriter(sw *snappy.Writer)

func WrapReadWriteCloser

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

Types

type ReadWriteCloser

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

func (*ReadWriteCloser) Close

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

type WrapReadWriteCloserConn

type WrapReadWriteCloserConn struct {
	io.ReadWriteCloser
	// contains filtered or unexported fields
}

func (*WrapReadWriteCloserConn) LocalAddr

func (rwcc *WrapReadWriteCloserConn) LocalAddr() net.Addr

func (*WrapReadWriteCloserConn) RemoteAddr

func (rwcc *WrapReadWriteCloserConn) RemoteAddr() net.Addr

func (*WrapReadWriteCloserConn) SetDeadline

func (rwcc *WrapReadWriteCloserConn) SetDeadline(t time.Time) error

func (*WrapReadWriteCloserConn) SetReadDeadline

func (rwcc *WrapReadWriteCloserConn) SetReadDeadline(t time.Time) error

func (*WrapReadWriteCloserConn) SetWriteDeadline

func (rwcc *WrapReadWriteCloserConn) SetWriteDeadline(t time.Time) error

Jump to

Keyboard shortcuts

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