DEV Community

Andy Pan
Andy Pan

Posted on


【gnet】: Support Windows platform and add several codecs for encoding/decoding TCP frames




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 IOCP Go stdlib: net

Top comments (0)