Enum tungstenite::error::ProtocolError [−][src]
pub enum ProtocolError {}Show variants
WrongHttpMethod, WrongHttpVersion, MissingConnectionUpgradeHeader, MissingUpgradeWebSocketHeader, MissingSecWebSocketVersionHeader, MissingSecWebSocketKey, SecWebSocketAcceptKeyMismatch, JunkAfterRequest, CustomResponseSuccessful, HandshakeIncomplete, HttparseError(Error), SendAfterClosing, ReceivedAfterClosing, NonZeroReservedBits, UnmaskedFrameFromClient, MaskedFrameFromServer, FragmentedControlFrame, ControlFrameTooBig, UnknownControlFrameType(u8), UnknownDataFrameType(u8), UnexpectedContinueFrame, ExpectedFragment(Data), ResetWithoutClosingHandshake, InvalidOpcode(u8), InvalidCloseSequence,
Indicates the specific type/cause of a protocol error.
Variants
Use of the wrong HTTP method (the WebSocket protocol requires the GET method be used).
Wrong HTTP version used (the WebSocket protocol requires version 1.1 or higher).
Missing Connection: upgrade
HTTP header.
Missing Upgrade: websocket
HTTP header.
Missing Sec-WebSocket-Version: 13
HTTP header.
Missing Sec-WebSocket-Key
HTTP header.
The Sec-WebSocket-Accept
header is either not present or does not specify the correct key value.
Garbage data encountered after client request.
Custom responses must be unsuccessful.
No more data while still performing handshake.
HttparseError(Error)
Wrapper around a httparse::Error
value.
Not allowed to send after having sent a closing frame.
Remote sent data after sending a closing frame.
Reserved bits in frame header are non-zero.
The server must close the connection when an unmasked frame is received.
The client must close the connection when a masked frame is received.
Control frames must not be fragmented.
Control frames must have a payload of 125 bytes or less.
UnknownControlFrameType(u8)
Type of control frame not recognised.
UnknownDataFrameType(u8)
Type of data frame not recognised.
Received a continue frame despite there being nothing to continue.
ExpectedFragment(Data)
Received data while waiting for more fragments.
Connection closed without performing the closing handshake.
InvalidOpcode(u8)
Encountered an invalid opcode.
The payload for the closing frame is invalid.
Trait Implementations
impl Clone for ProtocolError
[src]
impl Clone for ProtocolError
[src]fn clone(&self) -> ProtocolError
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Error for ProtocolError
[src]
impl Error for ProtocolError
[src]impl PartialEq<ProtocolError> for ProtocolError
[src]
impl PartialEq<ProtocolError> for ProtocolError
[src]