About this project

cellnet is a high-performance, componentized, and easily extensible open-source server network library written in Go. After multiple version iterations, it is suitable both for beginners to learn from and is widely used in private and commercial projects, especially in the game server field. ## Main Features - **Transport Protocol Support**: - TCP: supports connector reconnection and listener graceful restart. - UDP: pure UDP raw packet send/receive. - HTTP (in testing): supports JSON and form send/receive, convenient for game servers to interface with SDKs, but for large-scale web services it is recommended to use specialized libraries (such as gin). - WebSocket: implemented based on gorilla/websocket. - **Codec**: - Built-in support for Google Protobuf, JSON, binary protocol (goobjfmt), ProtoPlus (protoplus), and other encoding formats. - Supports mixed encoding for send/receive, allowing simultaneous communication with servers in different languages using different encodings without modifying code. - **Queue Models**: - Supports single-threaded asynchronous logic (suitable for MMORPG), multi-threaded synchronous logic (suitable for robots), and multi-threaded concurrent logic (suitable for gateways, HTTP servers). - **RPC**: supports synchronous and asynchronous RPC. - **Message Logging**: makes it convenient to view every field of sent and received messages. ## Architecture and Extension cellnet highly abstracts Processor and Peer, allowing users to extend horizontally to meet different network encapsulation needs. It supports custom Codec, Peer, and Processor. ## Usage Examples Provides simple examples for server and client, demonstrating how to create a Peer, bind handlers, and send and receive messages. ## Getting and Compiling Requires Go 1.10 or above, and obtains related dependencies via `go get`. ## Documentation and Support Provides documentation on queues, Peer, message handling, extension customization, etc., as well as FAQ and version history. ## Contributors Thanks to multiple contributors for fixing bugs and optimizing performance. ## Version History v4 (2018.5), v3 (2017.8), v2 (2017.1), v1 (2015.8).