pub struct Socket;Expand description
A client-side socket which communicates with an underlying unordered & unreliable protocol
Implementations§
Source§impl Socket
impl Socket
Sourcepub fn connect(
server_session_url: &str,
config: &SocketConfig,
) -> (Box<dyn IdentityReceiver>, Box<dyn PacketSender>, Box<dyn PacketReceiver>)
pub fn connect( server_session_url: &str, config: &SocketConfig, ) -> (Box<dyn IdentityReceiver>, Box<dyn PacketSender>, Box<dyn PacketReceiver>)
Connects to the given server address
Sourcepub fn connect_with_auth(
server_session_url: &str,
config: &SocketConfig,
auth_bytes: Vec<u8>,
) -> (Box<dyn IdentityReceiver>, Box<dyn PacketSender>, Box<dyn PacketReceiver>)
pub fn connect_with_auth( server_session_url: &str, config: &SocketConfig, auth_bytes: Vec<u8>, ) -> (Box<dyn IdentityReceiver>, Box<dyn PacketSender>, Box<dyn PacketReceiver>)
Connects to the given server address with authentication
Sourcepub fn connect_with_auth_headers(
server_session_url: &str,
config: &SocketConfig,
auth_headers: Vec<(String, String)>,
) -> (Box<dyn IdentityReceiver>, Box<dyn PacketSender>, Box<dyn PacketReceiver>)
pub fn connect_with_auth_headers( server_session_url: &str, config: &SocketConfig, auth_headers: Vec<(String, String)>, ) -> (Box<dyn IdentityReceiver>, Box<dyn PacketSender>, Box<dyn PacketReceiver>)
Connects to the given server address with authentication
Sourcepub fn connect_with_auth_and_headers(
server_session_url: &str,
config: &SocketConfig,
auth_bytes: Vec<u8>,
auth_headers: Vec<(String, String)>,
) -> (Box<dyn IdentityReceiver>, Box<dyn PacketSender>, Box<dyn PacketReceiver>)
pub fn connect_with_auth_and_headers( server_session_url: &str, config: &SocketConfig, auth_bytes: Vec<u8>, auth_headers: Vec<(String, String)>, ) -> (Box<dyn IdentityReceiver>, Box<dyn PacketSender>, Box<dyn PacketReceiver>)
Connects to the given server address with authentication
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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