UNPKG

nerdbank-streams

Version:
26 lines (25 loc) 958 B
export interface QualifiedChannelId { /** Gets the channel ID. */ readonly id: number; /** Gets a value indicating where the channel originated. */ readonly source: ChannelSource; } /** * An enumeration of the possible sources of a channel. * @description The ordinal values are chosen so as to make flipping the perspective as easy as negating the value, * while leaving the Seeded value unchanged. */ export declare enum ChannelSource { /** The channel was offered by this MultiplexingStream instance to the other party. */ Local = 1, /** The channel was offered to this MultiplexingStream instance by the other party. */ Remote = -1, /** * The channel was seeded during construction via the Options.SeededChannels collection. * This channel is to be accepted by both parties. */ Seeded = 0 } export declare namespace QualifiedChannelId { function toString(id: QualifiedChannelId): string; }