udwNetTestV2

package
v0.0.0-...-f254aa5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout = errors.New("timeout")
)

Functions

func MustTcpPipe

func MustTcpPipe() (c1 net.Conn, c2 net.Conn)

func NewPipeConnsSimple

func NewPipeConnsSimple() (c1 net.Conn, c2 net.Conn)

func RunTestOnPipe

func RunTestOnPipe(newConn func() (io.ReadWriteCloser, io.ReadWriteCloser))

func RunTestTwoRwc

func RunTestTwoRwc(c io.ReadWriteCloser, s io.ReadWriteCloser)

func TcpPipe

func TcpPipe() (c1 *net.TCPConn, c2 *net.TCPConn, err error)

Types

type InmemoryListener

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

func NewInmemoryListener

func NewInmemoryListener() *InmemoryListener

func (*InmemoryListener) Accept

func (ln *InmemoryListener) Accept() (net.Conn, error)

func (*InmemoryListener) Addr

func (ln *InmemoryListener) Addr() net.Addr

func (*InmemoryListener) Close

func (ln *InmemoryListener) Close() error

func (*InmemoryListener) Dial

func (ln *InmemoryListener) Dial() (net.Conn, error)

func (*InmemoryListener) SetConnInnerBufferPacketSize

func (ln *InmemoryListener) SetConnInnerBufferPacketSize(size int)

type PipeConns

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

func NewPipeConns

func NewPipeConns(InnerBufferPacketSize int) *PipeConns

func (*PipeConns) Close

func (pc *PipeConns) Close() error

func (*PipeConns) Conn1

func (pc *PipeConns) Conn1() net.Conn

func (*PipeConns) Conn2

func (pc *PipeConns) Conn2() net.Conn

Jump to

Keyboard shortcuts

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