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,
Expand description
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
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnwindSafe for ProtocolError
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V