もうやる気はないけど出鱈目を書いたままにしておくのもあれなんで訂正させてもらう

>Emscripten ツールチェーンとかいうの見てきてもwebsocketとかのこと書いてないし
https://emscripten.org/docs/tools_reference/emsdk.html#emsdk

↑これ嘘。

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
If you are familiar with networking concepts provided by different web APIs, such as XmlHttpRequest, Fetch, WebSockets and WebRTC,
you can quickly get started by leveraging what you already know: by calling out from C/C++ code to JavaScript (see the “Connecting C++ and JavaScript” section),
you can establish networked connections by writing regular JavaScript. For C/C++ developers, Emscripten provides a few approaches, described here.
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
https://emscripten.org/docs/porting/networking.html?highlight=websocket

ほんとかどうかは知らんけど、websocket等についてすぐに始めることができる(you can quickly get started)とは書いてあった

>Emulated POSIX TCP Sockets over WebSockets

にゃるほどって感じ