NorthstarLauncher
NorthstarLauncher copied to clipboard
Potentially add Websocket support for Squirrel mods
Hey!
This issue is here to discuss the potential addition of websocket support in Northstar, which would let you make websocket connections in Squirrel mods.
If this interests you, please leave a comment below explaining your use cases and potential requirements.
My main use case would be for my discord bridge rewrite. I may find others too.
I'd need to have two way communication with an external server, and be able to encode / decide json on the squirrel side in order to send various gave events and act on messages from the server.
I'm for adding a libcurl-based (the other ones have varying levels of dirtiness/bloat/non-compliance/bugginess) websocket client personally. I'd personally use it for debugging FD and remote control of dynamically managed instances.
Overall, from all the useful response on the Discord server, I guess modders just need a websocket client, so that would easily be added.
I would be interested in Websocket to drop my forked version of Northstar to use my Telemetry system.
I am not to well versed in C++ and the websocket libraries. Would it be possible for this integration to have the ability to add custom HTTP headers for authentication to the opening handshake?
I'll probably have some fun doing that this weekend.
I am not to well versed in C++ and the websocket libraries. Would it be possible for this integration to have the ability to add custom HTTP headers for authentication to the opening handshake?
Very likely yes.
I've been told you could use websockets to make a non-interacting coop system where each player runs in sp and just their position is transmitted to the other player as a sort of live ghost replay, which could be very cool for speedrun tournaments imo
I've been told you could use websockets to make a non-interacting coop system where each player runs in sp and just their position is transmitted to the other player as a sort of live ghost replay, which could be very cool for speedrun tournaments imo
Note that such a speedrun tournament (Mach 3 March) will happen in a bit less than two months. So for anyone contemplating implementing this, getting a PoC working a while beforehand might be desirable ;)
@Fuchsiano and I implemented a basic websocket using the Plugin v2 API. I bet it's not the best implementation but it's at least better than nothing.
It can connect, write, read and disconnect. (Read is based on a polling system)
https://github.com/Neoministein/R2Northstar-Websocket
Plugin linked above has been updated to latest Northstar Plugins version (v4) and probably covers this use-case quite well unless there's still need to have it dedicated in Northstar.