conn

package
v0.0.0-...-5d396e8 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(addr, typ string, tlsCfg *tls.Config) (conn *loggedConn, err error)

func DialHttpProxy

func DialHttpProxy(proxyUrl, addr, typ string, tlsCfg *tls.Config) (conn *loggedConn, err error)

func Join

func Join(c Conn, c2 Conn) (int64, int64)

func Wrap

func Wrap(conn net.Conn, typ string) *loggedConn

Types

type Conn

type Conn interface {
	net.Conn
	log.Logger
	Id() string
	SetType(string)
	CloseRead() error
}

type Listener

type Listener struct {
	net.Addr
	Conns chan *loggedConn
}

func Listen

func Listen(addr, typ string, tlsCfg *tls.Config) (l *Listener, err error)

type Tee

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

func NewTee

func NewTee(conn Conn) *Tee

func (*Tee) Read

func (c *Tee) Read(b []byte) (n int, err error)

func (*Tee) ReadBuffer

func (c *Tee) ReadBuffer() *bufio.Reader

func (*Tee) ReadFrom

func (c *Tee) ReadFrom(r io.Reader) (n int64, err error)

func (*Tee) Write

func (c *Tee) Write(b []byte) (n int, err error)

func (*Tee) WriteBuffer

func (c *Tee) WriteBuffer() *bufio.Reader

Jump to

Keyboard shortcuts

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