https://github.com/sipt/gotling
Barrage (Go)
https://github.com/sipt/gotling
Last synced: 11 months ago
JSON representation
Barrage (Go)
- Host: GitHub
- URL: https://github.com/sipt/gotling
- Owner: sipt
- License: apache-2.0
- Created: 2017-09-19T14:06:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T03:29:16.000Z (over 8 years ago)
- Last Synced: 2025-02-28T08:22:16.461Z (over 1 year ago)
- Language: Go
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gotling
基于UDP传输协议的消息分发系统(UDP练习)
## 介绍
UDP优点小而快,没有拥塞控制,不会因网络状况降低服务器的发送能力。
在这里基于UDP完成消息的群发功能。
## 使用
客户端和服务端分别在`client`和`server`目录下。(初版功能还比较残缺)
### Server
server启动参数
> `port` server的监听端口
server使用
```
➜ checkin //创建room
roomID: 130780276472156160
➜ rooms //列出room的列表
130780276472156160
130780290527268864
➜ room 130780276472156160 //显示指定room下的users
user list:
130769265472049152
130769494896283648
130769597438627840
130769633933266944
130769650605625344
130769218000916480
```
### Client
client启动参数
> `ip` 服务器ip
> `sport` server的端口
> `cport` client的本地端口
client使用
```
Gotaling [130791658546532352]: // [useid]
请输入昵称:
➜ sipt //暂时还没有什么用,可以随便输
➜ into 130792013070077952 //进入房间
[130792013070077952]➜ 这是一条测试数据 //发送数据,在服务器中同一个房间内注册的用户都会收到
➜ out //退出房间,以后房间内的消息不会再收到
➜
```