WebSocket
Ready to testOpen a connection, echo a message, close cleanly.
How to read this check
This tests one message round trip to NetOkay. It does not test another service, a long session, or your application.
Check that your browser can connect, exchange a message, and close normally.
Open a connection, echo a message, close cleanly.
This tests one message round trip to NetOkay. It does not test another service, a long session, or your application.
Only this browser’s connection to NetOkay is tested. Your original application has not been tested.
The check opens wss://netokay.net/v1/control/ws from this browser, sends one
short challenge, and waits for a byte-identical echo. After the echo arrives the page
closes the connection with code 1000 and records whether the close was clean. The whole
exchange has a 15-second limit.
It is a browser-to-NetOkay control check: it shows that this browser can complete a WebSocket handshake, one message round trip, and a normal close through its current network path. It never connects to your application's server and cannot see your protocol.
Paste this into a browser console or a small script to reproduce the check outside this page. The control endpoint echoes any text message and closes the socket itself after a bounded time.
const socket = new WebSocket('wss://netokay.net/v1/control/ws');
socket.onopen = () => socket.send('hello');
socket.onmessage = (event) => {
console.log('echo:', event.data);
socket.close(1000, 'done');
};
socket.onclose = (event) => console.log('closed:', event.code, event.wasClean);
From a terminal, the NetOkay CLI runs the same bounded template with
--transport wss; see the CLI reference.
A passed check does not verify a long-lived session, reconnect behaviour, authentication, or your application's own message protocol.
The same network can pass this check and still break another WebSocket. These are the usual reasons; the check cannot tell them apart.
Upgrade and
Connection headers, so the handshake never completes.
wss://, or
blocks every port except 443.
If this check passes and your application fails, continue with WebSocket connection failed: what to check.
No. It only reaches NetOkay's echo endpoint. To check your server's HTTP reachability from NetOkay, use the website and API check; to compare this browser with your terminal, use Compare environments.
Code 1006 means the connection ended without a close frame. Browsers report it for any abrupt end: a dropped TCP connection, a proxy timeout, or a crashed server. It does not say which. See the WebSocket close codes reference.
The challenge is a random string generated by this page, echoed back, and discarded. The NetOkay Worker has no storage binding, so message content is not persisted; see Privacy.
Test failed? Read WebSocket connection failed: what to check.
Need to check your own endpoint? Check HTTP status, then compare with your device.