2 Star 2 Fork 0

WangYneos / WebSocketForBDX

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

WebSocketAPI

玩家消息(服务端发出

player send a message

{"operate":"onmsg","target":"WangYneos","text":"HelloWorld"}
//操作标识——————————目标——————————————————返回信息(玩家聊天内容)

玩家加入(服务端发出

when a playe join the server

{"operate":"onjoin","target":"WangYneos","text":"target's ip address"}
//操作标识——————————---目标——————————————————返回信息(玩家ip)

玩家退出(服务端发出

when the player left the server

{"operate":"onleft","target":"WangYneos","text":"Lefted server"}
//与上面类似

玩家使用命令(服务端发出

when the player use a command

{"operate":"onCMD","target":"WangYneos","text":"/list"}
//操作标识-----------目标玩家--------------执行的命令

WS客户端使用命令

WebSocket Client execute a command

发送 send

{"operate":"runcmd","passwd":"CD92DDCEBFB8D3FB1913073783FAC0A1","cmd":"in_game command here"}
//标识--操作类型--密码---------------------------------------执行内容----------------

服务端返回 feedback by server

{"operate":"runcmd","Auth":"PasswdMatch","text":"Command Feedback"}
//操作标识---操作类型--密码验证--成功---------返回内容----------------------------
{"operate":"runcmd","Auth":"Failed”,"text":"Password Not Match" }
//操作标识---操作类型--出错-------验证---------返回内容--------------

密码获得规则

服务端获取密码

+当前 年月日时分

(无分号,空格

例如密码是passwd

则验证密码passwd202004062016

(2020年4月6日8点16

取MD5(大写

得到CD92DDCEBFB8D3FB1913073783FAC0A1

客户端与服务端一致则验证成功

Way to get the passwd

1,get the base password(for example:passwd)

2,add (int)year month day hour minute(e.g :passwd2020040110)

3,get the MD5 vaule and it's the passwd

(one passwd can be use in 2 min

空文件

简介

通过Websocket协议与BDX服务器联动 展开 收起
C++
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/wangyneos/BDXWebSocket.git
git@gitee.com:wangyneos/BDXWebSocket.git
wangyneos
BDXWebSocket
WebSocketForBDX
master

搜索帮助