[][src]Struct stdweb::web::SocketCloseCode

pub struct SocketCloseCode(pub u16);

Wrapper type around a CloseEvent code, indicating why the WebSocket was closed

(JavaScript docs)

Methods

impl SocketCloseCode[src]

pub const NORMAL_CLOSURE: SocketCloseCode[src]

Normal closure; the connection successfully completed whatever purpose for which it was created.

pub const GOING_AWAY: SocketCloseCode[src]

The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.

pub const PROTOCOL_ERROR: SocketCloseCode[src]

The endpoint is terminating the connection due to a protocol error.

pub const UNSUPPORTED_DATA: SocketCloseCode[src]

The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).

pub const NO_STATUS_RECEIVED: SocketCloseCode[src]

Reserved. Indicates that no status code was provided even though one was expected.

pub const ABNORMAL_CLOSURE: SocketCloseCode[src]

Reserved. Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.

pub const INVALID_FRAME_PAYLOAD_DATA: SocketCloseCode[src]

The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message).

pub const POLICY_VIOLATION: SocketCloseCode[src]

The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable.

pub const MESSAGE_TOO_BIG: SocketCloseCode[src]

The endpoint is terminating the connection because a data frame was received that is too large.

pub const MISSING_EXTENSION: SocketCloseCode[src]

The client is terminating the connection because it expected the server to negotiate one or more extensions, but the server didn't.

pub const INTERNAL_ERROR: SocketCloseCode[src]

The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.

pub const SERVICE_RESTART: SocketCloseCode[src]

The server is terminating the connection because it is restarting.

pub const TRY_AGAIN_LATER: SocketCloseCode[src]

The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients.

pub const BAD_GATEWAY: SocketCloseCode[src]

The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.

pub const TLS_HANDSHAKE: SocketCloseCode[src]

Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).

Trait Implementations

impl Clone for SocketCloseCode[src]

impl Copy for SocketCloseCode[src]

impl Eq for SocketCloseCode[src]

impl Ord for SocketCloseCode[src]

impl PartialEq<SocketCloseCode> for SocketCloseCode[src]

impl PartialOrd<SocketCloseCode> for SocketCloseCode[src]

impl Debug for SocketCloseCode[src]

impl Hash for SocketCloseCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]