Type Alias soketto::handshake::http::Error

source ·
pub type Error = Error;
Expand description

A re-export of handshake::Error.

Aliased Type§

enum Error {
Show 13 variants Io(Error), UnsupportedHttpVersion, IncompleteHttpRequest, SecWebSocketKeyInvalidLength(usize), InvalidRequestMethod, HeaderNotFound(String), UnexpectedHeader(String), InvalidSecWebSocketAccept, UnsolicitedExtension, UnsolicitedProtocol, Extension(Box<dyn Error + Send + Sync>), Http(Box<dyn Error + Send + Sync>), Utf8(Utf8Error),
}

Variants§

§

Io(Error)

An I/O error has been encountered.

§

UnsupportedHttpVersion

An HTTP version =/= 1.1 was encountered.

§

IncompleteHttpRequest

An incomplete HTTP request.

§

SecWebSocketKeyInvalidLength(usize)

The value of the Sec-WebSocket-Key header is of unexpected length.

§

InvalidRequestMethod

The handshake request was not a GET request.

§

HeaderNotFound(String)

An HTTP header has not been present.

§

UnexpectedHeader(String)

An HTTP header value was not expected.

§

InvalidSecWebSocketAccept

The Sec-WebSocket-Accept header value did not match.

§

UnsolicitedExtension

The server returned an extension we did not ask for.

§

UnsolicitedProtocol

The server returned a protocol we did not ask for.

§

Extension(Box<dyn Error + Send + Sync>)

An extension produced an error while encoding or decoding.

§

Http(Box<dyn Error + Send + Sync>)

The HTTP entity could not be parsed successfully.

§

Utf8(Utf8Error)

UTF-8 decoding failed.