MockRTC API Reference
    Preparing search index...

    Interface DataChannelStream

    Turns a node-datachannel DataChannel into a real Node.js stream, complete with buffering, backpressure (up to a point - if the buffer fills up, messages are dropped), and support for piping data elsewhere.

    Read & written data may be either UTF-8 strings or Buffers - this difference exists at the protocol level, and is preserved here throughout.

    interface DataChannelStream {
        get id(): number;
        get isOpen(): boolean;
        get label(): string;
        get protocol(): string;
    }

    Hierarchy

    • Duplex
      • DataChannelStream
    Index