cpool

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PoolCleanerInterval = time.Second * 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

func New

func New(size int, ttl, cleanerInterval time.Duration) *Pool

func (*Pool) ConnRemain

func (p *Pool) ConnRemain() int

func (*Pool) Get

func (p *Pool) Get() (c net.Conn)

func (*Pool) Put

func (p *Pool) Put(c net.Conn)

Jump to

Keyboard shortcuts

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