internal

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConn = errors.New("Invalid Connection.")
)

Functions

func GetSysFd

func GetSysFd(conn net.Conn) (int, error)

Types

type ConnectionId

type ConnectionId struct {
	Local      v2net.Address
	Remote     v2net.Address
	RemotePort v2net.Port
}

func NewConnectionId

func NewConnectionId(source v2net.Address, dest v2net.Destination) ConnectionId

type ConnectionRecyler

type ConnectionRecyler interface {
	Put(ConnectionId, net.Conn)
}

type ExpiringConnection

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

func (*ExpiringConnection) Expired

func (o *ExpiringConnection) Expired() bool

type Pool

type Pool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewConnectionPool

func NewConnectionPool() *Pool

func (*Pool) Cleanup

func (o *Pool) Cleanup()

func (*Pool) Get

func (o *Pool) Get(id ConnectionId) net.Conn

func (*Pool) Put

func (o *Pool) Put(id ConnectionId, conn net.Conn)

Jump to

Keyboard shortcuts

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