|
|
|
@ -3,6 +3,7 @@ use crate::protocol::frame::coding::{Data, OpCode}; |
|
|
|
|
use crate::protocol::frame::Frame; |
|
|
|
|
use crate::protocol::message::{IncompleteMessage, IncompleteMessageType}; |
|
|
|
|
use crate::{Error, Message}; |
|
|
|
|
use crate::protocol::MAX_MESSAGE_SIZE; |
|
|
|
|
|
|
|
|
|
/// An uncompressed message handler for a WebSocket.
|
|
|
|
|
#[derive(Debug)] |
|
|
|
@ -11,6 +12,15 @@ pub struct UncompressedExt { |
|
|
|
|
max_message_size: Option<usize>, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl Default for UncompressedExt { |
|
|
|
|
fn default() -> Self { |
|
|
|
|
UncompressedExt { |
|
|
|
|
incomplete: None, |
|
|
|
|
max_message_size: Some(MAX_MESSAGE_SIZE) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl UncompressedExt { |
|
|
|
|
/// Builds a new `UncompressedExt` that will permit a maximum message size of `max_message_size`
|
|
|
|
|
/// or will be unbounded if `None`.
|
|
|
|
|