Categories
Uncategorized

WebSocket

项目需要制作一个网页聊天的功能,于是想到了使用 Websocket

使用当中注意几点:

WebSocket 的最新版本使用的是

在绑定的地址的时候,注意使用 0.0.0.0 不然会出现 connection refused

附上可以测试使用的代码

 

Leave a Reply

Your email address will not be published. Required fields are marked *