我在 WebSocket 握手期间遇到了错误。
Firefox 无法建立与 ws://localhost:8082/FetchNotification/NewFile.htmlatpendpoint 服务器的连接。
有没有人遇到过同样的问题?
我已经参考了来自以下网址的代码:
https://dzone.com/articles/wso2-products-resolving-err-ssl-weak-ephemeral-dh
你应该使用的函数调用的URL
Echo.connect("ws://localhost:8082/FetchNotification/NewFile.html")
如果你正在使用类似于 Echo.connect("ws://" + host + "/NewFile.html") 的变量,请确保它是 /FetchNotification/NewFile.html 而不是其他路径。
否则,在 WebSocket 终端点中,请确保上述 URL 是你正在使用的 URL。
ServerEndpointConfig.Builder.create(EchoEndpoint.class,"/FetchNotification/Newfile.html").build());