pub struct ReliableClientEndpoint {
pub sender: ReliableClientSender,
pub receiver: ReliableClientReceiver,
/* private fields */
}Expand description
Reliable client endpoint combining sender and receiver state.
Fields§
§sender: ReliableClientSenderSender state.
receiver: ReliableClientReceiverReceiver state.
Implementations§
Source§impl ReliableClientEndpoint
impl ReliableClientEndpoint
Sourcepub fn new(config: ReliableClientConfig) -> Self
pub fn new(config: ReliableClientConfig) -> Self
Creates a reliable client endpoint.
Sourcepub fn send<T: TransportSink>(
&mut self,
transport: &mut T,
packet: OutboundPacket,
now_tick: u64,
) -> Result<u64, ReliableClientError<T::Error>>
pub fn send<T: TransportSink>( &mut self, transport: &mut T, packet: OutboundPacket, now_tick: u64, ) -> Result<u64, ReliableClientError<T::Error>>
Sends a new reliable packet to a peer client.
Sourcepub fn retry_due<T: TransportSink>(
&mut self,
transport: &mut T,
now_tick: u64,
) -> Result<ReliableRetryReport, ReliableClientError<T::Error>>
pub fn retry_due<T: TransportSink>( &mut self, transport: &mut T, now_tick: u64, ) -> Result<ReliableRetryReport, ReliableClientError<T::Error>>
Retries due reliable client packets.
Sourcepub fn handle_inbound<T: TransportSink>(
&mut self,
transport: &mut T,
packet: InboundPacket,
) -> Result<Option<InboundPacket>, ReliableClientError<T::Error>>
pub fn handle_inbound<T: TransportSink>( &mut self, transport: &mut T, packet: InboundPacket, ) -> Result<Option<InboundPacket>, ReliableClientError<T::Error>>
Handles one inbound reliable client packet.
Trait Implementations§
Source§impl Clone for ReliableClientEndpoint
impl Clone for ReliableClientEndpoint
Source§fn clone(&self) -> ReliableClientEndpoint
fn clone(&self) -> ReliableClientEndpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReliableClientEndpoint
impl Debug for ReliableClientEndpoint
Auto Trait Implementations§
impl Freeze for ReliableClientEndpoint
impl RefUnwindSafe for ReliableClientEndpoint
impl Send for ReliableClientEndpoint
impl Sync for ReliableClientEndpoint
impl Unpin for ReliableClientEndpoint
impl UnsafeUnpin for ReliableClientEndpoint
impl UnwindSafe for ReliableClientEndpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more