Struct naia_server_socket::PacketSender
source · [−]pub struct PacketSender { /* private fields */ }Expand description
Used to send packets to the Server Socket
Implementations
sourceimpl PacketSender
impl PacketSender
sourcepub fn new(channel_sender: Sender<(SocketAddr, Box<[u8]>)>) -> Self
pub fn new(channel_sender: Sender<(SocketAddr, Box<[u8]>)>) -> Self
Creates a new PacketSender
sourcepub fn send(&self, address: &SocketAddr, payload: &[u8])
pub fn send(&self, address: &SocketAddr, payload: &[u8])
Sends a packet to the Server Socket
Trait Implementations
sourceimpl Clone for PacketSender
impl Clone for PacketSender
sourcefn clone(&self) -> PacketSender
fn clone(&self) -> PacketSender
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for PacketSender
impl Send for PacketSender
impl Sync for PacketSender
impl Unpin for PacketSender
impl UnwindSafe for PacketSender
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