Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

websocket-event-codes

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket-event-codes

A small Node module containing enumerated Websocket status codes.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3K
increased by25.46%
Maintainers
1
Weekly downloads
 
Created
Source

Websocket Event Codes

Overview

A small Node module containing enumerated Websocket status codes. This module is library agnostic and has no dependencies.

Largely inspired by a similar module for HTTP status codes by prettymuchbryce

Installation

Via npm : npm install --save websocket-event-codes

Via yarn : yarn add websocket-event-codes

Event codes table

NameCodeDescription
NORMAL_CLOSURE1000The connection successfully completed whatever purpose for which it was created.
GOING_AWAY1001The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.
PROTOCOL_ERROR1002The endpoint is terminating the connection due to a protocol error.
UNSUPPORTED_DATA1003he connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).
NO_STATUS_RECEIVED1005Reserved. Indicates that no status code was provided even though one was expected.
ABNORMAL_CLOSURE1006Reserved. Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.
INVALID_FRAME_PAYLOAD_DATA1007The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message).
POLICY_VIOLATION1008The 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.
MESSAGE_TOO_BIG1009The endpoint is terminating the connection because a data frame was received that is too large.
MISSING_EXTENSION1010The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't.
INTERNAL_ERROR1011The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
SERVICE_RESTART1012The server is terminating the connection because it is restarting.
TRY_AGAIN_LATER1013The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients.
BAD_GATEWAY1014The 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.
TLS_HANDSHAKE1015Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).

Keywords

FAQs

Package last updated on 28 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc