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.
License: MIT License
Go 98.36%Makefile 0.29%Dockerfile 0.33%Shell 1.02%
conf:= nbio.Configstruct {
// Name describes your gopher name for logging, it's set to "NB" by defaultName: "NB",
// MaxLoad represents the max online num, it's set to 10k by defaultMaxLoad: 1024*10,
// NPoller represents poller goroutine num, it's set to runtime.NumCPU() by defaultNPoller: runtime.NumCPU(),
// ReadBufferSize represents buffer size for reading, it's set to 16k by defaultReadBufferSize: 1024*16,
// MaxWriteBufferSize represents max write buffer size for Conn, it's set to 1m by default.// if the connection's Send-Q is full and the data cached by nbio is // more than MaxWriteBufferSize, the connection would be closed by nbio.MaxWriteBufferSizeuint32// LockListener represents listener's goroutine to lock thread or not, it's set to false by default.LockListenerbool// LockPoller represents poller's goroutine to lock thread or not.LockPollerbool
}