WS Status & Op Code npm package
Utility to interact with Websocket status & Op Code. This library strictly follow the RFC6455
Usage
With this module, you can call it with a Status Code / Op Code or a message name.
StatusCode
- The Status Code will return the message name
- The Message name will return the Status Code
OpCode
- The Op Code will return the message name
- The Message name will return the Op Code
API
This module only map a message name constant to a code or the opposite It works for OpCode and StatusCode
API sample
const StatusCode OpCode = ; //// StatusCode// echo "Normal Closure"console; // echo 1000console; //// OpCode// echo "Ping frame"console; // echo 9console;