87,955
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
WebSocket connection to 'ws://localhost/Test/socket' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
Firefox 无法建立到 ws://localhost/Test/socket 服务器的连接。
var webSocket = new WebSocket(loc || settings.wsHost);
wsHost: "ws://localhost/Test/socket",
@ServerEndpoint(value="/socket")