Skip to content
 
 

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gotling

基于UDP传输协议的消息分发系统(UDP练习)

介绍

UDP优点小而快,没有拥塞控制,不会因网络状况降低服务器的发送能力。 在这里基于UDP完成消息的群发功能。

使用

客户端和服务端分别在clientserver目录下。(初版功能还比较残缺)

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 //退出房间,以后房间内的消息不会再收到

➜

About

Barrage (Go)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages