Skip to content

Feature/dedicated server - #94

Merged
aecsocket merged 14 commits into
aecsocket:mainfrom
ForTehLose:feature/dedicated_server
Aug 16, 2026
Merged

Feature/dedicated server#94
aecsocket merged 14 commits into
aecsocket:mainfrom
ForTehLose:feature/dedicated_server

Conversation

@ForTehLose

Copy link
Copy Markdown
Contributor

Added a feature to enable the use of steams dedicated server calls. I had to refactor a few things to make this clean.

Comment thread crates/aeronet_steam/Cargo.toml Outdated
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 = []

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fine to unconditionally include dedicated server code, so no need for the dedicated_server feature

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, i have removed the feature flag

ForTehLose and others added 10 commits August 16, 2026 16:58
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
aecsocket force-pushed the feature/dedicated_server branch from 2e6a5f2 to 2b2ba15 Compare August 16, 2026 08:30
@aecsocket

Copy link
Copy Markdown
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

@aecsocket
aecsocket merged commit 840baad into aecsocket:main Aug 16, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants