> For the complete documentation index, see [llms.txt](https://wiki.ainzzorl.lol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.ainzzorl.lol/tech/technologies/web-sockets.md).

# Web Sockets

* <https://stackoverflow.com/questions/14703627/websockets-protocol-vs-http>
* <https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API>
* <https://stackoverflow.blog/2019/12/18/websockets-for-fun-and-profit/>

Allows low-latency bi-directional communication. Low-latency server-to-client can be accomplished with long-held connections, but client-to-server require establishing new connections each time.

The connection must be kept alive on the server somehow.
