Commit graph

8 commits

Author SHA1 Message Date
Ash Logan
fbe2b91e75 feat(endpoint): Route connection closures via new cleanupConnection method
Centralising connection closures helps ensure that everything gets done (.cleanup()) and there's One True Way to find them in the Connections map

It's worth noting that every callsite has a PRUDPConnection*, so maybe a different datastructure would serve us better here?
2025-01-04 17:33:33 +11:00
Ash Logan
5dda129a6f chore: Remove Connections tracking from SocketConnection
Every SocketConnection had a map of *PRUDPConnection, which was never actually inserted into anywhere, so the intended function of tracking what OS sockets have which PRUDP streams was not being done.

Remove it as dead code. If the rest of the connection tracking is going to be implemented, this commit can be reverted.

Since the SocketConnection no longer has long-lived state in it, also remove the map on PRUDPServer and just create it as a simple data structure when needed.

The connection close handling of the websocket server had to be rewritten - the old code would never do anything due to the empty maps, so this can't be *worse* than nothing :)
2025-01-03 17:58:46 +11:00
Daniel López Guimaraes
3b90bdc96b
refactor: Update ServerInterface to EndpointInterface
This requires a lot of refactor but it brings back the option of getting
events when a connection disconnects.
2024-02-11 00:03:05 +00:00
Jonathan Barrow
9cec5d9e9c
prudp: completely redo virtual connections 2024-01-15 15:01:26 -05:00
Daniel López Guimaraes
9e5f8bf781
websocket: Panic if ListenAndServe fails 2023-12-14 20:20:00 +00:00
Jonathan Barrow
5648479445
prudp: clean up websocket client disconnects 2023-12-13 19:51:33 -05:00
Jonathan Barrow
a64a555520
prudp: swap WebSocket libraries 2023-12-12 04:32:34 -05:00
Jonathan Barrow
99c37d3df2
prudp: experimental WSS and PRUDPLite support 2023-12-11 00:22:19 -05:00