Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding an option to prefer WebSockets over other protocols #1065

Open
JustArchi opened this issue Dec 6, 2021 · 0 comments
Open

Comments

@JustArchi
Copy link
Contributor

JustArchi commented Dec 6, 2021

What problem is this feature trying to solve?

Currently we have 3 available protocols: TCP, UDP and WS (actually WSS) for connecting with Steam CMs. WS connection, according to the best of my knowledge and other people I've talked with (e.g. @xPaw, @yaakov-h) is the most preferred solution, as it simplifes on a lot of aspects, for example Steam encryption. In addition to that, current official Steam client, to the best of my knowledge, has internal implementation that rolls 50% chance for picking a WS server, so it's definitely an option. There should be a way for users to specify that WS is preferred protocol to use when deciding about CM server to connect with.

How would you like it to be solved?

It could be something simple like a ProtocolTypes? PreferredProtocols. When provided, SK2 server-list picker implementation would firstly consider all servers matching PreferredProtocols. However, when none are available, or all were marked as Bad (or accordingly decided to be non-available), SK2 would fallback to configured WithProtocolTypes().

Have you considered any alternative solutions

Just limiting available protocols to use with SteamConfiguration doesn't cut it. The objective shouldn't be absolute eradication of other protocols, but rather, a strong preference which would still consider fallback options if e.g. Steam API reported no WS servers available, but e.g. some TCP/UDP up. If user wants to use WS exclusively he already can do that, but I'd want to use WS whenever possible, while still falling back to other protocols when not possible.

Additional Information

I talked with @xPaw and he told me to open an issue 🐱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant