TCP/IP latency is measured passively on the server, from the timing of
the TCP handshake and the packets that follow it in the connection.
WebSocket latency is measured actively in JavaScript. The browser opens a
WebSocket and sends several ping messages; their round-trip times are recorded.
Comparison. If the WebSocket latency is significantly higher than the
TCP/IP latency, the traffic is likely routed through a proxy tunnel, which adds measurable overhead.