chrome websocket代码中如何接收TLS握手错误

时间:2018-12-26 13:07:54

标签: javascript html5 websocket

https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent

#include "pch.h"

请参阅:Browser compatibility
示例chrome(版本71.0)返回1006错误,firefox(版本64.0(64位))1015:

1015    TLS Handshake   Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).

1 个答案:

答案 0 :(得分:0)

不能用catch捕获错误,回调就是错误。您可以遵循此guide