WebSocket test
Connect to any WebSocket server from your browser, send messages and read the replies, with the time each one took and every close code explained.
Your browser connects straight to the address you enter. Your address and messages are not sent to us or kept.
Using WordPlus Cloud? Test the connection to our servers.
Step by step: WebSocket connection failed: how to test it and what error 1006 means
Reading the results
WebSocket close codes
When a connection ends, the browser gives a close code. These are the ones the standard defines. Codes from 4000 up belong to the server or its library.
| Code | What it means |
|---|---|
1000 | Normal closure. Either side finished and closed on purpose. |
1001 | Going away. The server is shutting down, or the page was left. |
1002 | Protocol error. One side broke the WebSocket protocol. |
1003 | Unsupported data. One side received a kind of message it does not accept, such as binary where it expects text. |
1005 | No status. The connection closed without giving a code. |
1006 | Abnormal closure. The connection ended with no close message: a refused handshake, a TLS problem, or a network or proxy that dropped it. |
1007 | Invalid data. A text message was not valid UTF-8. |
1008 | Policy violation. The server refused the connection or a message under its rules, often authentication or the origin. |
1009 | Message too big. The other side will not take a message of that size. |
1010 | Missing extension. The client expected an extension the server did not offer. |
1011 | Server error. Something went wrong on the server. |
1012 | Service restart. The server is restarting, so connect again. |
1013 | Try again later. The server cannot take this connection now. |
1015 | TLS failure. The secure connection could not be set up, often because of a certificate. |
WordPlus Cloud
Realtime without a server of your own
Your app connects to our realtime servers through our SDKs, with rooms, presence and reconnects, and you run no WebSocket server.
Tools
More tests you can run
WordPlus Cloud connection test
See whether this network reaches our realtime servers, relays and media servers, and which region is nearest.
TURN server test
Check that a STUN or TURN server answers, accepts your credentials and really relays data.
WebRTC test
See whether this browser and network can make video calls, in plain words.
Webcam test
See the picture from your camera, with its real resolution and frame rate.
Microphone test
Watch your level, record a few seconds and hear how you sound.
Questions
Frequently asked
How do I test a WebSocket server?
Enter its wss:// address and press Connect. The log shows how long the connection took and each message in both directions, and if it closes, the close code and what it means.
What does close code 1006 mean?
The connection ended with no close message, and browsers give no more detail. The usual reasons are a handshake the server or a proxy refused, a TLS certificate problem, or a network or proxy that drops WebSocket traffic.
Why does my server work locally but fail here?
This page is served over HTTPS, so browsers allow only wss:// here, apart from ws:// to localhost. The server also sees this site as the Origin, so one that allows only its own sites refuses the connection.
Can I send custom headers?
No browser can set headers on a WebSocket. Send a token in the query string, as a subprotocol or in your first message, as every browser client of your server has to.
Do my messages go through WordPlus?
No. Your browser connects straight to the address you entered, and nothing you send or receive reaches us.
Why does the connection drop after about a minute?
Proxies and load balancers often close a connection that has been quiet for a while, commonly after 60 seconds. Send a ping or a small message more often than that.
Do I need to run a WebSocket server of my own?
Not with WordPlus Cloud. Your app connects to our realtime servers through our SDKs, with rooms, presence and reconnects, priced by connections.