Skip to content

five-on-it / apps/client/src/renderer/net

apps/client/src/renderer/net ​

The browser WebSocket as a Transport, the wait for the server's welcome, and the watch for a lost server to come back. Frames sent before the socket is open are dropped (inputs are sent every tick anyway). The transport tells whether its socket ever opened: one refused never did, its server not listening yet (the desktop app's own still starting on a big level, a server restarting), and is worth waiting for; one the server opened and closed before welcoming it was turned away. The page asks for a big level by its hash (byHashUrl), and holds the frames that come while it fetches it (holdMessages), so the game built after the download misses none of them.

Interfaces ​

Type Aliases ​

Functions ​