UNPKG

nerdbank-streams

Version:
31 lines (30 loc) 944 B
/** * Signals what kind of frame is being transmitted. */ export declare enum ControlCode { /** * A channel is proposed to the remote party. */ offer = 0, /** * A channel proposal has been accepted. */ offerAccepted = 1, /** * The payload of the frame is a payload intended for channel consumption. */ content = 2, /** * 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. */ contentWritingCompleted = 3, /** * Sent when a channel is closed, an incoming offer is rejected, or an outgoing offer is canceled. */ channelTerminated = 4, /** * Sent when a channel has finished processing data received from the remote party, allowing them to send more data. */ contentProcessed = 5 }