Struct muxado::SessionBuilder
source · pub struct SessionBuilder<S> { /* private fields */ }
Expand description
Builder for a muxado session.
Should probably leave this alone unless you’re sure you know what you’re doing.
Implementations§
source§impl<S> SessionBuilder<S>where
S: AsyncRead + AsyncWrite + Send + 'static,
impl<S> SessionBuilder<S>where S: AsyncRead + AsyncWrite + Send + 'static,
sourcepub fn new(io_stream: S) -> Self
pub fn new(io_stream: S) -> Self
Start building a new muxado session using the provided IO stream.
sourcepub fn window_size(self, size: usize) -> Self
pub fn window_size(self, size: usize) -> Self
Set the stream window size. Defaults to 256kb.
sourcepub fn accept_queue_size(self, size: usize) -> Self
pub fn accept_queue_size(self, size: usize) -> Self
Set the accept queue size. This is the size of the channel that will hold “open stream” requests from the remote. If Accept::accept isn’t called and the channel fills up, the session will block. Defaults to 64.
sourcepub fn stream_limit(self, count: usize) -> Self
pub fn stream_limit(self, count: usize) -> Self
Set the maximum number of streams allowed at a given time. If this limit is reached, new streams will be refused. Defaults to 512.
sourcepub fn start(self) -> MuxadoSession
pub fn start(self) -> MuxadoSession
Start a muxado session with the current options.