多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
- ws客户端发起连接,地址为ws://服务器地址:端口/ ![](https://img.kancloud.cn/a7/d9/a7d9dc516b11f09752cf91e0078a901b_891x580.png) ![](https://img.kancloud.cn/32/ba/32bab1961f16a7fac81ab29775851af3_994x341.png) - 登陆后的uid分别为948与863 - 现在948像863发送一条点对点消息:{"event":"point","data":{"to":863,"content":"来自863的ws消息"}},响应如下: ![](https://img.kancloud.cn/4d/22/4d229c165536894768c2e2306802ff9f_895x240.png) ![](https://img.kancloud.cn/3d/67/3d67d0cd4a61e8da967d194f44a0743d_1001x292.png) - 使用api给948发送一条消息:服务器地址:端口?to=948&msg=apimsg&uid=863 ![](https://img.kancloud.cn/9d/03/9d0391f1dbf39bc12fed724ec1864558_920x304.png) - 发送一条ping消息:{"event":"ping","data":""} ![](https://img.kancloud.cn/01/74/0174a76e4626d5a153f704fc98afd09d_993x388.png) - 更多事件请自行开发,这里仅为基础样例