[][src]Trait naia_server_socket::ServerSocketTrait

pub trait ServerSocketTrait: Send + Sync {
#[must_use]    pub fn receive<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Packet, NaiaServerSocketError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
pub fn get_sender(&mut self) -> MessageSender;
pub fn with_link_conditioner(
        self: Box<Self>,
        config: &LinkConditionerConfig
    ) -> Box<dyn ServerSocketTrait>; }

Defines the functionality of a Naia Server Socket

Required methods

#[must_use]pub fn receive<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Packet, NaiaServerSocketError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Receive a new packet from the socket, or a tick event

pub fn get_sender(&mut self) -> MessageSender[src]

Gets a MessageSender you can use to send messages through the Server Socket

Wraps the current socket in a LinkConditioner

Loading content...

Implementors

impl ServerSocketTrait for ServerSocket[src]

Loading content...