[][src]Trait naia_client_socket::ClientSocketTrait

pub trait ClientSocketTrait: Debug {
    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>

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

fn get_sender(&mut self) -> MessageSender

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

Wraps the current socket in a LinkConditioner

Loading content...

Implementors

Loading content...