Struct naia_client_socket::Socket
source · [−]pub struct Socket { /* private fields */ }
Expand description
A client-side socket which communicates with an underlying unordered & unreliable protocol
Implementations
sourceimpl Socket
impl Socket
sourcepub fn new(config: &SocketConfig) -> Self
pub fn new(config: &SocketConfig) -> Self
Create a new Socket
sourcepub fn packet_sender(&self) -> PacketSender
pub fn packet_sender(&self) -> PacketSender
Gets a PacketSender which can be used to send packets through the Socket
sourcepub fn packet_receiver(&self) -> PacketReceiver
pub fn packet_receiver(&self) -> PacketReceiver
Gets a PacketReceiver which can be used to receive packets from the Socket
Auto Trait Implementations
impl !RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin for Socket
impl !UnwindSafe for Socket
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more