/**
 * WebSocket Protocol Constants
 * Based on RFC 6455
 */
/**
 * WebSocket opcode types
 */
export var WebSocketOpcode;
(function (WebSocketOpcode) {
    WebSocketOpcode[WebSocketOpcode["CONTINUATION"] = 0] = "CONTINUATION";
    WebSocketOpcode[WebSocketOpcode["TEXT"] = 1] = "TEXT";
    WebSocketOpcode[WebSocketOpcode["BINARY"] = 2] = "BINARY";
    WebSocketOpcode[WebSocketOpcode["CLOSE"] = 8] = "CLOSE";
    WebSocketOpcode[WebSocketOpcode["PING"] = 9] = "PING";
    WebSocketOpcode[WebSocketOpcode["PONG"] = 10] = "PONG";
})(WebSocketOpcode || (WebSocketOpcode = {}));
/**
 * WebSocket close codes
 */
export var WebSocketCloseCode;
(function (WebSocketCloseCode) {
    WebSocketCloseCode[WebSocketCloseCode["NORMAL_CLOSURE"] = 1000] = "NORMAL_CLOSURE";
    WebSocketCloseCode[WebSocketCloseCode["GOING_AWAY"] = 1001] = "GOING_AWAY";
    WebSocketCloseCode[WebSocketCloseCode["PROTOCOL_ERROR"] = 1002] = "PROTOCOL_ERROR";
    WebSocketCloseCode[WebSocketCloseCode["UNSUPPORTED_DATA"] = 1003] = "UNSUPPORTED_DATA";
    WebSocketCloseCode[WebSocketCloseCode["NO_STATUS_RECEIVED"] = 1005] = "NO_STATUS_RECEIVED";
    WebSocketCloseCode[WebSocketCloseCode["ABNORMAL_CLOSURE"] = 1006] = "ABNORMAL_CLOSURE";
    WebSocketCloseCode[WebSocketCloseCode["INVALID_FRAME_PAYLOAD_DATA"] = 1007] = "INVALID_FRAME_PAYLOAD_DATA";
    WebSocketCloseCode[WebSocketCloseCode["POLICY_VIOLATION"] = 1008] = "POLICY_VIOLATION";
    WebSocketCloseCode[WebSocketCloseCode["MESSAGE_TOO_BIG"] = 1009] = "MESSAGE_TOO_BIG";
    WebSocketCloseCode[WebSocketCloseCode["MISSING_EXTENSION"] = 1010] = "MISSING_EXTENSION";
    WebSocketCloseCode[WebSocketCloseCode["INTERNAL_ERROR"] = 1011] = "INTERNAL_ERROR";
    WebSocketCloseCode[WebSocketCloseCode["SERVICE_RESTART"] = 1012] = "SERVICE_RESTART";
    WebSocketCloseCode[WebSocketCloseCode["TRY_AGAIN_LATER"] = 1013] = "TRY_AGAIN_LATER";
    WebSocketCloseCode[WebSocketCloseCode["BAD_GATEWAY"] = 1014] = "BAD_GATEWAY";
    WebSocketCloseCode[WebSocketCloseCode["TLS_HANDSHAKE"] = 1015] = "TLS_HANDSHAKE";
})(WebSocketCloseCode || (WebSocketCloseCode = {}));
/**
 * WebSocket protocol version
 */
export const WEBSOCKET_VERSION = 13;
/**
 * WebSocket magic string for handshake
 */
export const WEBSOCKET_MAGIC_STRING = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11';
/**
 * WebSocket headers
 */
export const WEBSOCKET_HEADERS = {
    UPGRADE: 'upgrade',
    CONNECTION: 'connection',
    SEC_WEBSOCKET_KEY: 'sec-websocket-key',
    SEC_WEBSOCKET_VERSION: 'sec-websocket-version',
    SEC_WEBSOCKET_ACCEPT: 'sec-websocket-accept',
    SEC_WEBSOCKET_PROTOCOL: 'sec-websocket-protocol',
    SEC_WEBSOCKET_EXTENSIONS: 'sec-websocket-extensions',
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vdHMvcHJvdG9jb2xzL3dlYnNvY2tldC9jb25zdGFudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHO0FBRUg7O0dBRUc7QUFDSCxNQUFNLENBQU4sSUFBWSxlQU9YO0FBUEQsV0FBWSxlQUFlO0lBQ3pCLHFFQUFrQixDQUFBO0lBQ2xCLHFEQUFVLENBQUE7SUFDVix5REFBWSxDQUFBO0lBQ1osdURBQVcsQ0FBQTtJQUNYLHFEQUFVLENBQUE7SUFDVixzREFBVSxDQUFBO0FBQ1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