backedtcp

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Socket

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

Socket represents a single BackedTCP connection

func NewSocket

func NewSocket(getWire func() (net.Conn, error)) *Socket

NewSocket constructs a new BackedTCP connection.

func (*Socket) Close

func (sock *Socket) Close() (err error)

Close closes the socket.

func (*Socket) LocalAddr

func (sock *Socket) LocalAddr() net.Addr

func (*Socket) Read

func (sock *Socket) Read(p []byte) (n int, err error)

func (*Socket) RemoteAddr

func (sock *Socket) RemoteAddr() net.Addr

func (*Socket) Reset

func (sock *Socket) Reset() (err error)

Reset forces the socket to discard its underlying connection and reconnect.

func (*Socket) SetDeadline

func (sock *Socket) SetDeadline(t time.Time) error

func (*Socket) SetReadDeadline

func (sock *Socket) SetReadDeadline(t time.Time) error

func (*Socket) SetWriteDeadline

func (sock *Socket) SetWriteDeadline(t time.Time) error

func (*Socket) Write

func (sock *Socket) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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