Struct backroll::P2PSessionBuilder [−][src]
pub struct P2PSessionBuilder<T> where
T: BackrollConfig, { /* fields omitted */ }
Implementations
impl<T> P2PSessionBuilder<T> where
T: BackrollConfig,
[src]
impl<T> P2PSessionBuilder<T> where
T: BackrollConfig,
[src]pub fn new() -> Self
[src]
pub fn new() -> Self
[src]Creates a new builder. Identical to P2PSession::build.
pub fn with_disconnect_timeout(self, timeout: Duration) -> Self
[src]
pub fn with_disconnect_timeout(self, timeout: Duration) -> Self
[src]Sets how long the client will wait for a packet from a remote player before considering the connection disconnected. Defaults to 5000ms.
pub fn with_disconnect_notify_start(self, timeout: Duration) -> Self
[src]
pub fn with_disconnect_notify_start(self, timeout: Duration) -> Self
[src]Sets how long the client will wait for a packet from a remote player before before firing a BackrollEvent::ConnectionInterrupted event. Defaults to 750ms.
pub fn add_player(&mut self, player: BackrollPlayer) -> BackrollPlayerHandle
[src]
pub fn add_player(&mut self, player: BackrollPlayer) -> BackrollPlayerHandle
[src]Adds a player to the session and returns the corresponding handle.
pub fn start(self, pool: TaskPool) -> BackrollResult<P2PSession<T>>
[src]
pub fn start(self, pool: TaskPool) -> BackrollResult<P2PSession<T>>
[src]Constructs and starts the P2PSession. Consumes the builder.
Errors
Returns BackrollError::MultipleLocalPlayers if there are multiple local players. Backroll currently only supports one local player.
Auto Trait Implementations
impl<T> RefUnwindSafe for P2PSessionBuilder<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for P2PSessionBuilder<T> where
T: Send,
T: Send,
impl<T> Sync for P2PSessionBuilder<T> where
T: Sync,
T: Sync,
impl<T> Unpin for P2PSessionBuilder<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for P2PSessionBuilder<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,