Struct tokio_websockets::proto::Config
source · pub struct Config { /* private fields */ }
Expand description
Low-level configuration for a WebSocketStream
that allows configuring
behavior for sending and receiving messages.
Implementations§
source§impl Config
impl Config
sourcepub fn frame_size(self, frame_size: usize) -> Self
pub fn frame_size(self, frame_size: usize) -> Self
Set the frame payload size to split outgoing messages into.
Consider decreasing this if the remote imposes a limit on the frame payload size. The default is 4MiB.
§Panics
If frame_size
is 0
.
sourcepub fn flush_threshold(self, threshold: usize) -> Self
pub fn flush_threshold(self, threshold: usize) -> Self
Sets the threshold of queued up bytes after which the underlying I/O is flushed before the sink is declared ready. The default is 8 KiB.
Trait Implementations§
impl Copy for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)