pub struct WebSocketConfig {
pub max_frame_size: Option<usize>,
pub max_message_size: Option<usize>,
pub extensions: Option<Extensions>,
}
Expand description
Stores general configurations, to replace some default websockets connection parameters
Fields§
§max_frame_size: Option<usize>
Maximum value for Frame payload size, not counting the underlying basic frame components. By default, the maximum value is set as 16 MiB(Mebibyte) = 16 * 1024 * 1024 Increasing it over these limits, may impact the performance of the application, as well as the security, since malicious user can constantly send huge Frames.
max_message_size: Option<usize>
A message may be compounded by multiple Frames. Therefore, this config variable denotes the maximum payload size a message can have. The default is 64 MiB, which is reasonably big.
extensions: Option<Extensions>
This represents the extensions that will be applied, enabling compression and modifying relevant specs about server and client compression.
Trait Implementations§
Source§impl Clone for WebSocketConfig
impl Clone for WebSocketConfig
Source§fn clone(&self) -> WebSocketConfig
fn clone(&self) -> WebSocketConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WebSocketConfig
impl Debug for WebSocketConfig
Auto Trait Implementations§
impl Freeze for WebSocketConfig
impl RefUnwindSafe for WebSocketConfig
impl Send for WebSocketConfig
impl Sync for WebSocketConfig
impl Unpin for WebSocketConfig
impl UnwindSafe for WebSocketConfig
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