debug

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReadHexLogger

func NewReadHexLogger(prefix string, r io.Reader) io.Reader

NewReadHexLogger returns a reader that behaves like r except that it logs to stderr using ecoding/hex.

func NewReadLogger

func NewReadLogger(prefix string, r io.Reader) io.Reader

NewReadLogger returns a reader that behaves like r except that it logs (using log.Print) each read to standard error, printing the prefix and the hexadecimal data written.

func NewWriteLogger

func NewWriteLogger(prefix string, w io.Writer) io.Writer

NewWriteLogger returns a writer that behaves like w except that it logs (using log.Printf) each write to standard error, printing the prefix and the hexadecimal data written.

Types

type Conn

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

func WrapConn

func WrapConn(c net.Conn) *Conn

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() net.Addr

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() net.Addr

func (*Conn) SetDeadline

func (c *Conn) SetDeadline(t time.Time) error

func (*Conn) SetReadDeadline

func (c *Conn) SetReadDeadline(t time.Time) error

func (*Conn) SetWriteDeadline

func (c *Conn) SetWriteDeadline(t time.Time) error

type RWC

type RWC struct {
	io.Reader
	io.Writer
	// contains filtered or unexported fields
}

func (*RWC) Close

func (c *RWC) Close() error

Jump to

Keyboard shortcuts

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