xmpp-httpx - v0.11.0
    Preparing search index...

    Class IbbManager

    Index
    acceptTimeoutMs: number = DEFAULT_IBB_ACCEPT_TIMEOUT_MS
    idleTimeoutMs: number = DEFAULT_IDLE_TIMEOUT_MS
    parkFloorMs: number = DEFAULT_IBB_PARK_FLOOR_MS

    The shortest a block must go unanswered before it counts as parked at the receiver and stops holding a session slot; see DEFAULT_IBB_PARK_FLOOR_MS. The working threshold also scales with the measured ack latency, so a congested link (slow acks for everyone) keeps its fairness while a stalled consumer (one stream's acks withheld) does not freeze the rest.

    receiveWindowBlocks: number = DEFAULT_IBB_WINDOW

    Blocks an incoming stream will hold unread before it starts withholding acks. This is the receiver's half of the window: whatever the sender keeps in flight, the effective count is the smaller of the two, with no negotiation needed — the receiver simply stops acking. Per manager (so per session) because an arrives before any per-stream setup.

    sendWindowBlocks: number = DEFAULT_IBB_SESSION_WINDOW

    Blocks in flight across every sending stream of this session — the fair scheduler's budget (design §5.2, item 3). Per manager because it is per session: it bounds what all the streams together put into the one XMPP connection. When it is full, freed slots go to the waiting streams in turn, one block each, so a stream that has been sending for a minute and one that just started alternate rather than queue. A stream's own window still applies; one larger than this is capped by it.

    • The accepting side of openDuplex(): waits for the peer's on sid and answers it with a stream we can also send on. Our sending half adopts the peer's sid and block-size — it never sends an of its own, because the sid is already open.

      Parameters

      • from: string
      • sid: string
      • Optionaloptions: DuplexOptions & { timeoutMs?: number }

      Returns Promise<IbbDuplex>

    • Announces that an for sid from from (bare-JID matched) is expected and returns the stream once it arrives. If the already arrived and is parked, it is claimed immediately.

      timeoutMs bounds the wait for the ; idleTimeoutMs is the stream's own watchdog afterwards. Both default to the manager's idleTimeoutMs, which is what every stream used before either existed.

      Parameters

      • from: string
      • sid: string
      • Optionaloptions: { idleTimeoutMs?: IbbIdleTimeout; timeoutMs?: number }

      Returns Promise<IbbInStream>

    • Opens a stream that carries bytes both ways (design: one sid, two directions, each with its own seq counter — XEP-0047's seq is per sender). The inbound half is registered before the leaves, so the peer may start sending the moment it accepts.

      There is no half-close: close() from either side ends both directions, which is what a CONNECT tunnel needs (TLS never half-closes).

      Parameters

      • to: string
      • Optionaloptions: DuplexOptions & { blockSize?: number; sid?: string }

      Returns Promise<IbbDuplex>

    • Parameters

      • to: string
      • Optionaloptions: { blockSize?: number; from?: string; sid?: string; window?: number }
        • OptionalblockSize?: number
        • Optionalfrom?: string
        • Optionalsid?: string
        • Optionalwindow?: number

          Blocks allowed in flight at once; the ack of block k releases block k+window. Default DEFAULT_IBB_WINDOW, clamped to [1, MAX_IBB_WINDOW]; a window of 1 is exactly the old block-at-a-time sender.

          Per stream, never a manager field: one IbbManager is shared by the client, the server, sipub and jingle on a session, and a download's window is not an upload's.

      Returns Promise<IbbOutStream>