Skip to content
This repository was archived by the owner on Jun 16, 2024. It is now read-only.

tristanwietsma/netpool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netpool

Build Status GoDoc

Connection Pool

Install

go get github.com/tristanwietsma/netpool

Usage

Create a connection pool

p, err := netpool.NewConnectionPool("<type>", "<server ip address>", <pool size>)

Get a connection from the pool

c, err := p.Connect()

Use a connection

Connections implement Write and Read.

err := c.Write([]byte("ping"))
msg, err := c.Read()

Return a connection to the pool

p.Release(c)

Testing

Build and start the echoServer, then go test as normal.

About

connection pools for net

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages