Struct naia_client_socket::PacketSender
source · [−]pub struct PacketSender { /* private fields */ }
Expand description
Handles sending messages to the Server for a given Client Socket
Implementations
sourceimpl PacketSender
impl PacketSender
sourcepub fn new(server_addr: SocketAddr, local_socket: Arc<Mutex<UdpSocket>>) -> Self
pub fn new(server_addr: SocketAddr, local_socket: Arc<Mutex<UdpSocket>>) -> Self
Create a new PacketSender, if supplied with the Server’s address & a reference back to the parent Socket
sourcepub fn server_addr(&self) -> ServerAddr
pub fn server_addr(&self) -> ServerAddr
Get the Server’s Socket address
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more