use bytes::Bytes;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Message {
Text(String),
Binary(Bytes),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CloseFrame {
pub code: u16,
pub reason: String,
}
impl CloseFrame {
pub fn normal() -> Self {
Self {
code: 1000,
reason: String::new(),
}
}
}