pipe

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener interface {
	net.Listener

	Dial() (net.Conn, error)
	DialContext(ctx context.Context) (net.Conn, error)
}

type Net

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

func NewNet

func NewNet() *Net

func (*Net) Accept

func (pl *Net) Accept() (net.Conn, error)

func (*Net) AddConn

func (pl *Net) AddConn(c net.Conn)

Add conn forward the given conn to the listener

func (*Net) Addr

func (pl *Net) Addr() net.Addr

func (*Net) Close

func (pl *Net) Close() error

func (*Net) Dial

func (pl *Net) Dial() (net.Conn, error)

func (*Net) DialContext

func (pl *Net) DialContext(_ context.Context) (cclient net.Conn, _ error)

func (*Net) Network

func (pl *Net) Network() string

func (*Net) String

func (pl *Net) String() string

type Pipe

type Pipe struct {
	Listener
}

func NewBufferPipe

func NewBufferPipe(sz int) *Pipe

func NewNetPipe

func NewNetPipe(sz int) *Pipe

func (*Pipe) ClientConn

func (bl *Pipe) ClientConn(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Jump to

Keyboard shortcuts

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