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

Support steam p2p sockets #346

Merged
merged 6 commits into from
May 28, 2024
Merged

Conversation

msvbg
Copy link
Contributor

@msvbg msvbg commented May 12, 2024

Adds support for Steam P2P sockets. This has been tested by @zwazel and is confirmed to at least work partially, though with some kinks (#243).

I didn't add tests for this since that would require Steam to be installed to run tests.

@msvbg msvbg force-pushed the steam-p2p branch 5 times, most recently from ba21cc9 to b4b2c48 Compare May 12, 2024 17:51
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.44%. Comparing base (f1b2cb8) to head (e35cdb5).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #346      +/-   ##
==========================================
+ Coverage   67.43%   67.44%   +0.01%     
==========================================
  Files         159      159              
  Lines       10436    10440       +4     
==========================================
+ Hits         7037     7041       +4     
  Misses       3399     3399              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msvbg msvbg marked this pull request as ready for review May 28, 2024 18:41

// NOTE: it looks like there's SingleClient can actually be called on multiple threads
// - https://partner.steamgames.com/doc/api/steam_api#SteamAPI_RunCallbacks
pub(crate) struct SingleClientThreadSafe(steamworks::SingleClient);
Copy link
Owner

Choose a reason for hiding this comment

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

So do you think it would be possible to use this as a wrapper to the user's provided SteamworksClient to avoid the Arc<RwLock>?

@cBournhonesque
Copy link
Owner

Looks great to me, thanks!

@cBournhonesque cBournhonesque merged commit 03fcf7f into cBournhonesque:main May 28, 2024
5 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.

4 participants