4 ms·
Qt and emscripten took care of the bulk of it. Emscripten turns socket calls into websocket somewhat "transparently". The error handling is slightly different,
by freeciv21 5y ago
Qt and emscripten took care of the bulk of it. Emscripten turns socket calls into websocket somewhat "transparently". The error handling is slightly different, but it only took minor code changes to get that working. More effort was involved in making the Qt event loop play nicely in the browser. Freeciv is based on a server-client model, we host servers that the wasm clients connect to via websockets.
- chii 5y ago> we host servers that the wasm clients connect to via websockets. would it be possible to make this completely p2p so that another browser hosts the server and connect to it via webRTC style?
- freeciv21 5y agoIt should be possible, but it would take more invasive netcode changes to be able to handle webRTC. Emscripten does not do similar translation of socket calls to webRTC.