Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

What is error code 1000 when a websocket is closed?

more options

I have a web app that communicates with a Javascript file using JSON RPC 2.0. If the Javascript cannot connect to the server or if the server is suddenly "turned off" I will get a close code 1000. What is the error or close code 1000 in Firefox? I can't seem to find a definite answer.

I have a web app that communicates with a Javascript file using JSON RPC 2.0. If the Javascript cannot connect to the server or if the server is suddenly "turned off" I will get a close code 1000. What is the error or close code 1000 in Firefox? I can't seem to find a definite answer.

所有回覆 (2)

more options

選擇的解決方法

more options

the-edmeister said

See if these help you: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent https://tools.ietf.org/html/rfc6455#section-11.7

@the-edmeister, that gave me exactly what I needed. Thanks a bunch.

由 Programmer_Frank 於 修改