#[cfg(feature = "server")]
pub(crate) mod client_request;
#[cfg(feature = "client")]
pub(crate) mod server_response;
#[derive(Debug)]
pub enum Error {
MissingHeader(&'static str),
UpgradeNotWebsocket,
ConnectionNotUpgrade,
UnsupportedWebsocketVersion,
Parsing(httparse::Error),
DidNotSwitchProtocols(u16),
WrongWebsocketAccept,
}
impl From<httparse::Error> for Error {
fn from(err: httparse::Error) -> Self {
Self::Parsing(err)
}
}