pub struct P2PSessionBuilder<T> where
    T: Config
{ /* private fields */ }
Expand description

A builder for P2PSession.

Implementations

Creates a new builder. Identical to P2PSession::build.

Sets how much frame delay is used for all active players. Defaults to 3 frames.

Sets how long the client will wait for a packet from a remote player before considering the connection disconnected. Defaults to 5000ms.

Sets how long the client will wait for a packet from a remote player before before firing a Event::ConnectionInterrupted event. Defaults to 750ms.

Adds a player to the session and returns the corresponding handle.

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.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more