conn

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dial

type Dial struct {
	Addr string
}

func (*Dial) DialContext

func (d *Dial) DialContext(ctx context.Context) (io.ReadWriteCloser, error)

type DialDebug

type DialDebug struct {
	Dial Dialer
	Out  io.Writer
}

A DialDebug represents an log in stdout writing and reading bytes except protocol. debug-read shows count bytes which were read and debug-write shows count bytes which will be written.

func (*DialDebug) DialContext

func (d *DialDebug) DialContext(ctx context.Context) (io.ReadWriteCloser, error)

func (*DialDebug) Write

func (d *DialDebug) Write(b []byte) (n int, err error)

type Dialer

type Dialer interface {
	DialContext(ctx context.Context) (io.ReadWriteCloser, error)
}

Dialer is the interface implemented by types that can create new connection.

Jump to

Keyboard shortcuts

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