是否可以检测到由于证书无效而关闭了安全websocket?
若然,怎么样?
答案 0 :(得分:2)
不,这是不可能的。
客户端将以1006代码关闭:
1006
1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. It is designated for use in applications expecting a status code to indicate that the connection was closed abnormally, e.g., without sending or receiving a Close control frame.
此外,将调用onerror
处理程序,但它没有提及证书或其他特定问题。