nerdbank-streams
Version:
Multiplexing of streams
35 lines • 1.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ControlCode = void 0;
/**
* Signals what kind of frame is being transmitted.
*/
var ControlCode;
(function (ControlCode) {
/**
* A channel is proposed to the remote party.
*/
ControlCode[ControlCode["offer"] = 0] = "offer";
/**
* A channel proposal has been accepted.
*/
ControlCode[ControlCode["offerAccepted"] = 1] = "offerAccepted";
/**
* The payload of the frame is a payload intended for channel consumption.
*/
ControlCode[ControlCode["content"] = 2] = "content";
/**
* Sent after all bytes have been transmitted on a given channel. Either or both sides may send this.
* A channel may be automatically closed when each side has both transmitted and received this message.
*/
ControlCode[ControlCode["contentWritingCompleted"] = 3] = "contentWritingCompleted";
/**
* Sent when a channel is closed, an incoming offer is rejected, or an outgoing offer is canceled.
*/
ControlCode[ControlCode["channelTerminated"] = 4] = "channelTerminated";
/**
* Sent when a channel has finished processing data received from the remote party, allowing them to send more data.
*/
ControlCode[ControlCode["contentProcessed"] = 5] = "contentProcessed";
})(ControlCode || (exports.ControlCode = ControlCode = {}));
//# sourceMappingURL=ControlCode.js.map