Trait naia_client_socket::ClientSocketTrait [−][src]
pub trait ClientSocketTrait: ClientSocketBaseTrait { fn receive(&mut self) -> Result<Option<Packet>, NaiaClientSocketError>; fn get_sender(&mut self) -> MessageSender; fn with_link_conditioner(
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ClientSocketTrait>; }
Defines the functionality of a Naia Client Socket
Required methods
fn receive(&mut self) -> Result<Option<Packet>, NaiaClientSocketError>
[src]
Receive a new packet from the socket, or a tick event
fn get_sender(&mut self) -> MessageSender
[src]
Gets a MessageSender you can use to send messages through the Server Socket
fn with_link_conditioner(
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ClientSocketTrait>
[src]
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ClientSocketTrait>
Wraps the current socket in a LinkConditioner
Implementors
impl ClientSocketTrait for ClientSocket
[src]
impl ClientSocketTrait for ClientSocket
[src]fn receive(&mut self) -> Result<Option<Packet>, NaiaClientSocketError>
[src]
fn get_sender(&mut self) -> MessageSender
[src]
fn with_link_conditioner(
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ClientSocketTrait>
[src]
self: Box<Self>,
config: &LinkConditionerConfig
) -> Box<dyn ClientSocketTrait>