https://github.com/bugfan/gows
golang 千万级websocket消息推送server
https://github.com/bugfan/gows
Last synced: 4 months ago
JSON representation
golang 千万级websocket消息推送server
- Host: GitHub
- URL: https://github.com/bugfan/gows
- Owner: bugfan
- License: apache-2.0
- Created: 2018-09-01T14:21:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-06-27T14:56:23.000Z (almost 5 years ago)
- Last Synced: 2024-06-20T13:46:51.240Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 2.11 MB
- Stars: 35
- Watchers: 5
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# golang WebSocket消息推送服务
## 申明
1. client.html和main.go只是我写的一个测试案例,主要用impl下面的代码
## 功能
1. 维护所有在线链接
2. 可以根据指定的key去快速定位链接进行推送消息
3. 使用chan处理了线程安全问题
4. 发送/接受消息量为千万级别 (unix内核有瓶颈)
5. 增加了client.html websocket前端代码
## 使用
1. 先执行 `git clone https://github.com/bugfan/gows.git`
2. 进入gows目录 `cd xxxx/gows`
3. 启动程序 `go run main.go -debug=true -p=9000` // -debug参数指定是否将服务端日志打印出来,-p指定监听端口
## 容器化
1. 切换到此目录 ,执行 `docker build -t YourTag .`