[−][src]Trait naia_server_socket::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]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Packet, NaiaServerSocketError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
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
pub fn with_link_conditioner(
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ServerSocketTrait>
[src]
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ServerSocketTrait>
Wraps the current socket in a LinkConditioner
Implementors
impl ServerSocketTrait for ServerSocket
[src]
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]
&'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
[src]
pub fn with_link_conditioner(
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ServerSocketTrait>
[src]
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ServerSocketTrait>