Popularity
1.2
Declining
Activity
0.0
Stable
14
1
3
Programming language: Go
License: MIT License
Tags:
Networking
tspool alternatives and similar packages
Based on the "Networking" category.
Alternatively, view tspool alternatives based on common mentions on social networks and blogs.
-
fasthttp
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http -
gnet
🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go. -
Netmaker
Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks. -
mqttPaho
The Paho Go Client provides an MQTT client library for connection to MQTT brokers via TCP, TLS or WebSockets. -
fortio
Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats. -
nbio
Pure Go 1000k+ connections solution, support tls/http1.x/websocket and basically compatible with net/http, with high-performance and low memory cost, non-blocking, event-driven, easy-to-use. -
gev
🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers. -
gmqtt
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.x and V5 in golang -
easytcp
:sparkles: :rocket: EasyTCP is a light-weight TCP framework written in Go (Golang), built with message router. EasyTCP helps you build a TCP server easily fast and less painful. -
peerdiscovery
Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman: -
raw
DISCONTINUED. Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed. -
ethernet
Package ethernet implements marshaling and unmarshaling of IEEE 802.3 Ethernet II frames and IEEE 802.1Q VLAN tags. MIT Licensed.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai

Do you think we are missing an alternative of tspool or a related project?
Popular Comparisons
README
tspool
A TCP Library use worker pool to improve performance and protect your server.
Install
go get github.com/two/tspool
Usage
Build your server with tspool
server
package main
import (
"github.com/two/tspool"
"log"
"net"
)
func main() {
wp, err := tspool.DefaultWorkerPool(100, 200)
if err != nil {
log.Fatalln(err)
}
server := &tspool.Server{
Addr: "0.0.0.0:8088",
Handler: handler,
ErrHandler: errHandler,
WorkerPool: wp,
RejectHandler: rejectHandler,
}
err = tspool.ListenAndServe(server)
if err != nil {
log.Fatalln(err)
}
}
func handler(c net.Conn) {
addr := c.RemoteAddr()
c.Write([]byte("hello"))
c.Close()
log.Println(addr.String())
}
func errHandler(c net.Conn, err string) {
defer c.Close()
log.Fatalln("run server error: " + err)
}
func rejectHandler(c net.Conn, err string) {
defer c.Close()
log.Println("reject connect error: " + err)
}
Build your tspool client
package main
import (
"log"
"net"
"sync"
"time"
)
var wg = new(sync.WaitGroup)
func main() {
var num int = 2000
wg.Add(num)
for i := 0; i < num; i++ {
go conn()
}
wg.Wait()
log.Println("done")
}
func conn() {
defer wg.Done()
addr := "0.0.0.0:8088"
d := net.Dialer{Timeout: 100 * time.Millisecond}
conn, err := d.Dial("tcp", addr)
if err != nil {
log.Fatalln(err)
}
defer conn.Close()
raddr := conn.LocalAddr()
var r = make([]byte, 1024)
_, err = conn.Read(r)
if err != nil {
log.Printf(raddr.String() + " read error: " + err.Error())
}
log.Printf(raddr.String() + " got " + string(r))
}
Define your own worker pool and worker
Example
*Note that all licence references and agreements mentioned in the tspool README section above
are relevant to that project's source code only.