# <img width="80px" src="https://s2.ax1x.com/2019/10/09/u4yHo9.png" />
English | [简体中文](README-CN.md)
[![License](https://img.shields.io/badge/License-MIT-black.svg)](LICENSE)
[![Discord](https://img.shields.io/badge/zinx-Discord-blue.svg)](https://discord.gg/xQ8Xxfyfcz)
[![Gitter](https://img.shields.io/badge/zinx-Gitter-green.svg)](https://gitter.im/zinx_go/community)
[![zinx tutorial](https://img.shields.io/badge/ZinxTutorial-YuQue-red.svg)](https://www.yuque.com/aceld/npyr8s/bgftov)
[![Original Book of Zinx](https://img.shields.io/badge/OriginalBook-YuQue-black.svg)](https://www.yuque.com/aceld)
Zinx is a lightweight concurrent server framework based on Golang.
## Document
[ < Zinx Wiki : English > ](https://github.com/aceld/zinx/wiki)
[ < Zinx 文档 : 简体中文> ](https://www.yuque.com/aceld/tsgooa/sbvzgczh3hqz8q3l)
> **Note**:
> Zinx has been widely used in many enterprises for development purposes, including message forwarding for backend modules, long-linked game servers, and message handling plugins for web frameworks.
> Zinx is positioned as a framework with concise code that allows developers to quickly understand the internal details of the framework and easily customize it based on their own enterprise scenarios.
---
## Source of Zinx
### Github
Git: https://github.com/aceld/zinx
### Gitee(China)
Git: https://gitee.com/Aceld/zinx
### Website
http://zinx.me
---
## Online Tutorial
| platform | Entry |
| ---- | ---- |
| <img src="https://user-images.githubusercontent.com/7778936/236784004-b6d99e26-b1ab-4bc3-988e-7a46108b85fe.png" width = "100" height = "100" alt="" align=center />| [Zinx Framework tutorial-Lightweight server based on Golang](https://dev.to/aceld/1building-basic-services-with-zinx-framework-296e)|
|<img src="https://user-images.githubusercontent.com/7778936/236784168-6528a9b8-d37b-4b02-a37c-b9988d7508d8.jpeg" width = "100" height = "100" alt="" align=center />|[《Golang轻量级并发服务器框架zinx》](https://www.yuque.com/aceld)|
## Online Tutorial Video
| platform | online video |
| ---- | ---- |
| <img src="https://s1.ax1x.com/2022/09/22/xFePUK.png" width = "100" height = "100" alt="" align=center />| [![zinx-BiliBili](https://s2.ax1x.com/2019/10/13/uv340S.jpg)](https://www.bilibili.com/video/av71067087)|
| <img src="https://s1.ax1x.com/2022/09/22/xFeRVx.png" width = "100" height = "100" alt="" align=center /> | [![zinx-BiliBili](https://s2.ax1x.com/2019/10/13/uv340S.jpg)](https://www.douyin.com/video/6983301202939333891) |
| <img src="https://s1.ax1x.com/2022/09/23/xkQcng.png" width = "100" height = "100" alt="" align=center />| [![zinx-youtube](https://s2.ax1x.com/2019/10/14/KSurCR.jpg)](https://www.youtube.com/watch?v=U95iF-HMWsU&list=PL_GrAPKmuajzeNI8HBTi-k5NQO1g0rM-A)|
## I. One word that has been said before
Why did we create Zinx? Although there are many Golang application frameworks for servers, there are few lightweight enterprise frameworks applied in the gaming or other long-linked fields.
The purpose of designing Zinx is to provide a complete outline of how to write a TCP server based on Golang, so that more Golang enthusiasts can learn and understand this field in a straightforward manner.
The development of the Zinx framework project is synchronized with the creation of learning tutorials, and all the incremental and iterative thinking involved in the development process is incorporated into the tutorials. This approach avoids overwhelming beginners with a complete framework that they may find difficult to grasp all at once.
The tutorials will be iterated version by version, with each version adding small increments of functionality, allowing a beginner to gradually and comprehensively learn about the field of server frameworks.
Of course, we hope that more people will join Zinx and provide us with valuable feedback, enabling Zinx to become a truly enterprise-level server framework. Thank you for your attention!
### Reply from chatGPT(AI)
![what-is-zinx](https://user-images.githubusercontent.com/7778936/209745848-acfc14eb-74cd-4513-b386-8bc6e0bcc09f.png)
![compare-zinx](https://user-images.githubusercontent.com/7778936/209745864-7d8984b0-bd73-4109-b4ec-aec152f8f8e8.png)
### The honor of zinx
#### GVP Most Valuable Open Source Project of the Year at OSCHINA
![GVP-zinx](https://s2.ax1x.com/2019/10/13/uvYVBV.jpg)
## II. Zinx architecture
![Zinx框架](https://user-images.githubusercontent.com/7778936/220058446-0ad45112-2225-4b71-b0d8-69a7f3cee5ca.jpg)
![流程图](https://raw.githubusercontent.com/wenyoufu/testaaaaaa/master/%E6%B5%81%E7%A8%8B%E5%9B%BE-en.jpg)
![zinx-start](https://user-images.githubusercontent.com/7778936/126594039-98dddd10-ec6a-4881-9e06-a09ec34f1af7.gif)
## III. Zinx development API documentation
### (1) QuickStart
[<Zinx's TCP Debugging Tool>](https://github.com/xxl6097/tcptest)
DownLoad zinx Source
```bash
$go get github.com/aceld/zinx
```
> note: Golang Version 1.17+
#### Zinx-Server
```go
package main
import (
"fmt"
"github.com/aceld/zinx/ziface"
"github.com/aceld/zinx/znet"
)
// PingRouter MsgId=1
type PingRouter struct {
znet.BaseRouter
}
//Ping Handle MsgId=1
func (r *PingRouter) Handle(request ziface.IRequest) {
//read client data
fmt.Println("recv from client : msgId=", request.GetMsgID(), ", data=", string(request.GetData()))
}
func main() {
//1 Create a server service
s := znet.NewServer()
//2 configure routing
s.AddRouter(1, &PingRouter{})
//3 start service
s.Serve()
}
```
Run Server
```bash
$ go run server.go
```
```bash
██
▀▀
████████ ████ ██▄████▄ ▀██ ██▀
▄█▀ ██ ██▀ ██ ████
▄█▀ ██ ██ ██ ▄██▄
▄██▄▄▄▄▄ ▄▄▄██▄▄▄ ██ ██ ▄█▀▀█▄
▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀▀ ▀▀▀
┌──────────────────────────────────────────────────────┐
│ [Github] https://github.com/aceld │
│ [tutorial] https://www.yuque.com/aceld/npyr8s/bgftov │
└──────────────────────────────────────────────────────┘
[Zinx] Version: V1.0, MaxConn: 12000, MaxPacketSize: 4096
===== Zinx Global Config =====
Host: 0.0.0.0
TCPPort: 8999
Name: ZinxServerApp
Version: V1.0
MaxPacketSize: 4096
MaxConn: 12000
WorkerPoolSize: 10
MaxWorkerTaskLen: 1024
MaxMsgChanLen: 1024
ConfFilePath: /Users/Aceld/go/src/zinx-usage/quick_start/conf/zinx.json
LogDir: /Users/Aceld/go/src/zinx-usage/quick_start/log
LogFile:
LogIsolationLevel: 0
HeartbeatMax: 10
==============================
2023/03/09 18:39:49 [INFO]msghandler.go:61: Add api msgID = 1
2023/03/09 18:39:49 [INFO]server.go:112: [START] Server name: ZinxServerApp,listenner at IP: 0.0.0.0, Port 8999 is starting
2023/03/09 18:39:49 [INFO]msghandler.go:66: Worker ID = 0 is started.
2023/03/09 18:39:49 [INFO]msghandler.go:66: Worker ID = 1 is started.
2023/03/09 18:39:49 [INFO]msghandler.go:66: Worker ID = 3 is started.
2023/03/09 18:39:49 [INFO]msghandler.go:66: Worker ID = 2 is started.
2023/03/09 18:39:49 [INFO]msghandler.go:66: Worker ID = 4 is started.
2023/03/09 18:39:49 [INFO]msghandler.go:66: Worker ID = 6 is started.
2023/03/09 18:39:49 [INFO]msghandler.go:66: Worker ID = 7 is started.
2023/03/09 18:39:49 [INFO]msghandler.go:66: Worker
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于 Go 的轻量级并发TCP服务器框架毕业设计源码.zip (302个子文件)
DefaultWsdlHelpGenerator.aspx 61KB
DefaultWsdlHelpGenerator.aspx 59KB
sharedassets1.assets 3.41MB
resources.assets 1.3MB
sharedassets0.assets 24KB
globalgamemanagers.assets 12KB
Compat.browser 2KB
8d1834f70e47b17a9d8a767b83fee37a.caw 48KB
acf69143ed00df88a7ce289e9ba4a04c.caw 47KB
d1927eb117f2eb4a298976e370b491ce.caw 46KB
9bd8ac3a19e2b290a3e08ca6baadad51.caw 45KB
machine.config 27KB
machine.config 17KB
web.config 12KB
config 2KB
mscorlib.dll 2.38MB
mono.dll 2.02MB
System.Xml.dll 1.18MB
UnityEngine.dll 1.06MB
System.dll 1.02MB
Mono.Security.dll 287KB
System.Core.dll 260KB
Google.Protobuf.dll 255KB
UnityEngine.Networking.dll 230KB
UnityEngine.UI.dll 216KB
protobuf-net.dll 184KB
Assembly-CSharp.dll 41KB
dockerfile 144B
9bd8ac3a19e2b290a3e08ca6baadad51.ecm 16KB
8d1834f70e47b17a9d8a767b83fee37a.ecm 16KB
d1927eb117f2eb4a298976e370b491ce.ecm 16KB
acf69143ed00df88a7ce289e9ba4a04c.ecm 16KB
client.exe 16.91MB
globalgamemanagers 31KB
framedecoder.go 27KB
server.go 19KB
kcp_connection.go 18KB
ws_connection.go 18KB
connection.go 16KB
msg.pb.go 12KB
player.go 12KB
logger_core.go 12KB
msghandler.go 11KB
bili0x15router.go 11KB
shard_lock_map_test.go 9KB
globalobj.go 9KB
client.go 9KB
witer.go 8KB
shard_lock_map.go 7KB
ltvdecoder_little.go 7KB
tlvdecoder.go 7KB
timewheel.go 7KB
shard_lock_map_bench_test.go 7KB
aoi.go 7KB
request.go 6KB
Person.pb.go 6KB
htlvcrcdecoder.go 6KB
client_AI_robot.go 6KB
heartbeat.go 5KB
server_test.go 5KB
server.go 5KB
router.go 4KB
crc.go 4KB
client.go 4KB
timerscheduler.go 3KB
iconnection.go 3KB
irequest.go 3KB
userconf.go 3KB
async_op.go 3KB
async_op_result.go 3KB
Server.go 3KB
stdzlog.go 3KB
connmanager.go 3KB
RouterFuncApi.go 3KB
world_manager.go 3KB
datapack_tlv_bigendian_test.go 3KB
iserver.go 3KB
server.go 3KB
notify.go 3KB
datapack_ltv_littleendian.go 3KB
bili0x10router.go 3KB
defaultrouterfunc.go 3KB
datapack_tlv_bigendian.go 2KB
client.go 2KB
main.go 2KB
Server.go 2KB
timewheel_test.go 2KB
iclient.go 2KB
notify_test.go 2KB
timer.go 2KB
Server.go 2KB
timerscheduler_test.go 2KB
login.go 2KB
chain.go 2KB
irouter.go 2KB
bili0x13router.go 2KB
snowflake_uuid.go 2KB
zlog_test.go 2KB
client.go 2KB
server.go 2KB
共 302 条
- 1
- 2
- 3
- 4
资源评论
少年不带@℡
- 粉丝: 2253
- 资源: 2631
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 汇编语言开发案列优质学习资料资源工具与案列应用场景开发文档教程资料.txt
- Python + OpenCV开发案列优质学习资料资源工具与案列应用场景开发文档教程资料.txt
- 儿童节小游戏开发案列优质学习资料资源工具与案列应用场景开发文档教程资料.txt
- MySQL开发案列优质学习资料资源工具与案列应用场景开发文档教程资料.txt
- MATLAB仿真案列优质学习资料资源工具与案列应用场景开发文档教程资料.txt
- MATLAB优质学习资料资源工具与案列应用场景开发文档教程资料.txt
- 4319447015972566022ssm城市交通海量数据管理系统.zip
- 前端开发实例优质学习资料资源工具与案列应用场景开发文档教程资料.txt
- Screenshot_20240601_132217.jpg
- Screenshot_20240601_132233.jpg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功