UNPKG

@nixjs23n6/grpc-socket-core

Version:

gRPC for Web Clients.

48 lines 2.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WSEnums = void 0; var WSEnums; (function (WSEnums) { let ListenerTypes; (function (ListenerTypes) { ListenerTypes[ListenerTypes["ONCE"] = 1] = "ONCE"; ListenerTypes[ListenerTypes["LONG"] = 2] = "LONG"; ListenerTypes[ListenerTypes["STATE"] = 3] = "STATE"; })(ListenerTypes = WSEnums.ListenerTypes || (WSEnums.ListenerTypes = {})); let States; (function (States) { States[States["ON_PROTO_INIT"] = 0] = "ON_PROTO_INIT"; States[States["ON_OPENED"] = 1] = "ON_OPENED"; States[States["ON_ERROR"] = 2] = "ON_ERROR"; States[States["ON_CLOSE"] = 3] = "ON_CLOSE"; States[States["ON_CONNECTED"] = 4] = "ON_CONNECTED"; })(States = WSEnums.States || (WSEnums.States = {})); let Statuses; (function (Statuses) { Statuses[Statuses["SUCCESS"] = 1] = "SUCCESS"; Statuses[Statuses["ERROR"] = 2] = "ERROR"; Statuses[Statuses["TIMEOUT"] = 3] = "TIMEOUT"; })(Statuses = WSEnums.Statuses || (WSEnums.Statuses = {})); let WebsocketEvents; (function (WebsocketEvents) { WebsocketEvents["open"] = "open"; WebsocketEvents["close"] = "close"; WebsocketEvents["error"] = "error"; WebsocketEvents["message"] = "message"; // A message was received })(WebsocketEvents = WSEnums.WebsocketEvents || (WSEnums.WebsocketEvents = {})); let ProtoState; (function (ProtoState) { ProtoState["PROTO_NOT_FOUND"] = "PROTO_NOT_FOUND"; ProtoState["NOT_YET"] = "NOT_YET"; ProtoState["READY"] = "READY"; ProtoState["MESSAGE_ENCODERS_FAILED"] = "MESSAGE_ENCODERS_FAILED"; // Message encoders are not defined })(ProtoState = WSEnums.ProtoState || (WSEnums.ProtoState = {})); let ReasonCode; (function (ReasonCode) { ReasonCode[ReasonCode["CLOSE"] = 4000] = "CLOSE"; ReasonCode[ReasonCode["DESTROY"] = 4001] = "DESTROY"; ReasonCode[ReasonCode["CLOSE_TO_RECONNECT"] = 4002] = "CLOSE_TO_RECONNECT"; ReasonCode[ReasonCode["CLOSE_LOGOUT"] = 4003] = "CLOSE_LOGOUT"; })(ReasonCode = WSEnums.ReasonCode || (WSEnums.ReasonCode = {})); })(WSEnums = exports.WSEnums || (exports.WSEnums = {})); //# sourceMappingURL=index.js.map