Skip to content

Commit

Permalink
Merge pull request #177 from ymo-4/mms
Browse files Browse the repository at this point in the history
matchmaking servers wrapper
  • Loading branch information
Noxime authored Jul 30, 2024
2 parents 260e66d + c2aa1e5 commit d33cf78
Show file tree
Hide file tree
Showing 3 changed files with 593 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ thiserror = "1.0"
bitflags = "1.2"
lazy_static = "1.4"
serde = { version = "1.0", features = ["derive"], optional = true }
paste = "1.0.11"
image = { version = "0.25.1", optional = true, default-features = false }

[dev-dependencies]
Expand Down
14 changes: 14 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub use crate::error::*;
pub use crate::friends::*;
pub use crate::input::*;
pub use crate::matchmaking::*;
pub use crate::matchmaking_servers::*;
pub use crate::networking::*;
pub use crate::remote_play::*;
pub use crate::remote_storage::*;
Expand All @@ -44,6 +45,7 @@ mod error;
mod friends;
mod input;
mod matchmaking;
mod matchmaking_servers;
mod networking;
pub mod networking_messages;
pub mod networking_sockets;
Expand Down Expand Up @@ -310,6 +312,18 @@ impl<Manager> Client<Manager> {
}
}

/// Returns an accessor to the steam matchmaking_servers interface
pub fn matchmaking_servers(&self) -> MatchmakingServers<Manager> {
unsafe {
let mm = sys::SteamAPI_SteamMatchmakingServers_v002();
debug_assert!(!mm.is_null());
MatchmakingServers {
mms: mm,
_inner: self.inner.clone(),
}
}
}

/// Returns an accessor to the steam networking interface
pub fn networking(&self) -> Networking<Manager> {
unsafe {
Expand Down
Loading

0 comments on commit d33cf78

Please sign in to comment.