Andy Pan
Posted on December 12, 2019
Github
https://github.com/panjf2000/gnet
Introduction
gnet
is a high-performance(much better performance than the net
package in Go), lightweight, non-blocking, event-driven networking framework written in pure Go, it supports Linux, freeBSD and Windows platforms now.
All features:
- [x] High-performance event-loop under networking model of multiple threads/goroutines
- [x] Built-in load balancing algorithm: Round-Robin
- [x] Built-in goroutine pool powered by the library ants
- [x] Built-in memory pool with bytes powered by the library pool
- [x] Concise APIs
- [x] Efficient memory usage: Ring-Buffer
- [x] Supporting multiple protocols: TCP, UDP, and Unix Sockets
- [x] Supporting two event-driven mechanisms: epoll on Linux and kqueue on FreeBSD
- [x] Supporting asynchronous write operation
- [x] Flexible ticker event
- [x] SO_REUSEPORT socket option
- [x] Built-in multiple codecs to encode/decode network frames into/from TCP stream: LineBasedFrameCodec, DelimiterBasedFrameCodec, FixedLengthFrameCodec and LengthFieldBasedFrameCodec, referencing netty codec, also supporting customized codecs
- [x] Supporting Windows platform with
event-driven mechanism of IOCPGo stdlib: net
💖 💪 🙅 🚩
Andy Pan
Posted on December 12, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
automation How to automate the launch of your terminal processes (fzf + tmux + teamocil)
November 27, 2024
undefined [React Native library] Implementing a Header that Hides or Appears on Scroll
November 26, 2024