pub struct Socket { /* private fields */ }Implementations§
Source§impl Socket
impl Socket
pub fn connect( addr: &str, port: u32, appear_online: bool, token: &str, ) -> Socket
pub fn connected(&self) -> bool
pub fn try_recv(&mut self) -> Option<String>
pub fn join_match_by_id(&mut self, match_id: &str) -> u32
pub fn join_match_by_token(&mut self, token: &str) -> u32
pub fn leave_match(&mut self, match_id: &str) -> u32
pub fn match_data_send(&mut self, match_id: &str, opcode: i32, data: &[u8])
Sourcepub fn add_matchmaker(
&mut self,
min_count: u32,
max_count: u32,
query: &str,
string_properties: &str,
numeric_properties: &str,
) -> u32
pub fn add_matchmaker( &mut self, min_count: u32, max_count: u32, query: &str, string_properties: &str, numeric_properties: &str, ) -> u32
usage example: add_matchmaker(2, 4, "+properties.engine:\\\"macroquad_matchmaking\\\"", "{\"engine\":\"macroquad_matchmaking\"}");
pub fn create_match(&mut self) -> u32
Auto Trait Implementations§
impl !Freeze for Socket
impl !RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin for Socket
impl !UnwindSafe for Socket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more