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.
Auto Trait Implementations§
impl<S> Freeze for SessionBuilder<S>where
S: Freeze,
impl<S> RefUnwindSafe for SessionBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for SessionBuilder<S>where
S: Send,
impl<S> Sync for SessionBuilder<S>where
S: Sync,
impl<S> Unpin for SessionBuilder<S>where
S: Unpin,
impl<S> UnwindSafe for SessionBuilder<S>where
S: UnwindSafe,
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