dop20345
2016-03-29 14:34通过消息关闭Websocket连接
How is it possible to close a websocket connection and pass it a message / code?
The docs only define func (ws *Conn) Close() error
without any arguments
I would like to receive the event from JavaScript like this:
websocket.onclose = function(event) {
console.log(event);
};
I am using golang.org/x/net/websocket
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 进入例行程序-为什么websocket将连接报告为已关闭?
- websocket
- 1个回答
- 转到websocket jsonrpc浏览器连接关闭
- websocket
- 1个回答
- 如何从golang的websocket服务器向客户端主动发送消息
- websocket
- 3个回答
- 通过消息关闭Websocket连接
- websocket
- 1个回答
- 什么将相当于这个在PHP连接到套接字并发送消息[关闭]
- sockets
- php
- 1个回答
换一换