Feature/dedicated server - #94
Merged
Merged
Conversation
aecsocket
reviewed
Aug 4, 2026
Comment on lines
+26
to
+64
| @@ -55,6 +60,8 @@ steamworks = { workspace = true } | |||
| client = [] | |||
| ## Enables the `server` module. | |||
| server = [] | |||
| ## Enables the `dedicated server` module. | |||
| dedicated_server = [] | |||
Owner
There was a problem hiding this comment.
should be fine to unconditionally include dedicated server code, so no need for the dedicated_server feature
Contributor
Author
There was a problem hiding this comment.
OK, i have removed the feature flag
Replace the `SocketProvider` trait and `dedicated_server` module with a single `SteamworksSockets` enum used by both clients and servers. - Remove `SocketProvider` trait and its implementations. - Add `SteamworksSockets::networking_sockets()` helper. - Delete the `dedicated_server` module and its example; dedicated-server support is now just `SteamNetServer` backed by `SteamworksSockets::Server`. - Make `client`, `server`, and the shared `session` layer read the `SteamworksSockets` resource. - Update examples to insert the enum alongside `SteamworksClient`. Note: because there is a single `SteamworksSockets` resource, you cannot run a client-socket server and a server-socket server in the same app.
Reintroduce a dedicated game server example, adapted to the consolidated design: `SteamNetServer` backed by `SteamworksSockets::Server` (wrapping a `SteamworksServer`), with callbacks run on the `steamworks::Client` returned by `Steamworks::Server::init`.
Have `SteamworksSockets` wrap `steamworks::Client`/`steamworks::Server` directly instead of via the `SteamworksClient`/`SteamworksServer` resource wrappers. - Delete the `SteamworksClient`/`SteamworksServer` structs. - Add `SteamworksSockets::run_callbacks()`, so the enum is now the single resource users insert for both the IO layer and running Steam callbacks. - Update examples to insert only `SteamworksSockets`.
aecsocket
force-pushed
the
feature/dedicated_server
branch
from
August 16, 2026 08:30
2e6a5f2 to
2b2ba15
Compare
Owner
|
dedicated_server.rs was almost a carbon copy of server.rs, and we don't need SteamworksClient/SteamworksServer/SteamworksSockets 3 separate resources. updated to simplify the PR. this means you can't have steamworks client and server sockets in the same app but that should be fine since it's a relative edge case |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a feature to enable the use of steams dedicated server calls. I had to refactor a few things to make this clean.