@moqtap/codec 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-A33U4WVS.cjs +1993 -0
- package/dist/chunk-A655PHFX.cjs +446 -0
- package/dist/chunk-DLSGOZ6P.js +1993 -0
- package/dist/chunk-IWYKDCXP.js +446 -0
- package/dist/{codec-CewFCsEy.d.ts → codec-3ZgEK-Yj.d.ts} +1 -1
- package/dist/{codec-BFg5xnrJ.d.ts → codec-6s9d5yZm.d.ts} +1 -1
- package/dist/{codec-CAbm9d_n.d.cts → codec-B6ouUJrm.d.cts} +1 -1
- package/dist/{codec-3Ppy_5Gd.d.ts → codec-BhW5CGZq.d.ts} +1 -1
- package/dist/{codec-wtt6WF1K.d.ts → codec-Bp4HPezr.d.ts} +1 -1
- package/dist/{codec-BWQ5Jlap.d.cts → codec-BsSNjvB3.d.cts} +1 -1
- package/dist/codec-BvSmr-Jp.d.ts +30 -0
- package/dist/{codec-DftaRuVz.d.ts → codec-BvzKRqiP.d.ts} +1 -1
- package/dist/{codec-DFU-6Rax.d.ts → codec-BzRIVIzS.d.ts} +1 -1
- package/dist/{codec-DDUBJGn0.d.cts → codec-C17JvsEU.d.cts} +1 -1
- package/dist/{codec-BbbLDSKA.d.cts → codec-CBLLytyP.d.cts} +1 -1
- package/dist/{codec-Va_wZCF_.d.ts → codec-Cbv3sG2y.d.ts} +1 -1
- package/dist/{codec-R9TJCq-E.d.cts → codec-CzBmYisK.d.cts} +1 -1
- package/dist/{codec-CFWQY9Lj.d.cts → codec-D2YMCU11.d.cts} +1 -1
- package/dist/{codec-C8aSvE41.d.cts → codec-D5Ss123f.d.cts} +1 -1
- package/dist/{codec-j819z_hL.d.cts → codec-DS-As0Pp.d.cts} +1 -1
- package/dist/{codec-CpZrZ3ok.d.ts → codec-D_9X0i31.d.ts} +1 -1
- package/dist/{codec-B_QST4y1.d.cts → codec-DbpLHKXN.d.cts} +1 -1
- package/dist/{codec-B2lYE0YA.d.ts → codec-DqHwYWM-.d.ts} +1 -1
- package/dist/{codec-Db-0pk38.d.ts → codec-GayA_uN0.d.ts} +1 -1
- package/dist/codec-MxIhLDR5.d.cts +30 -0
- package/dist/{codec-lqDowbyT.d.cts → codec-R28KwiGM.d.cts} +1 -1
- package/dist/{codec-ZwV-Njt6.d.ts → codec-Tdey03Bo.d.ts} +1 -1
- package/dist/{codec-C7UzTYSS.d.cts → codec-yJ_axwtp.d.cts} +1 -1
- package/dist/draft07-session.d.cts +3 -3
- package/dist/draft07-session.d.ts +3 -3
- package/dist/draft07.d.cts +3 -3
- package/dist/draft07.d.ts +3 -3
- package/dist/draft08-session.d.cts +3 -3
- package/dist/draft08-session.d.ts +3 -3
- package/dist/draft08.d.cts +4 -4
- package/dist/draft08.d.ts +4 -4
- package/dist/draft09-session.d.cts +3 -3
- package/dist/draft09-session.d.ts +3 -3
- package/dist/draft09.d.cts +4 -4
- package/dist/draft09.d.ts +4 -4
- package/dist/draft10-session.d.cts +3 -3
- package/dist/draft10-session.d.ts +3 -3
- package/dist/draft10.d.cts +4 -4
- package/dist/draft10.d.ts +4 -4
- package/dist/draft11-session.d.cts +3 -3
- package/dist/draft11-session.d.ts +3 -3
- package/dist/draft11.d.cts +4 -4
- package/dist/draft11.d.ts +4 -4
- package/dist/draft12-session.d.cts +3 -3
- package/dist/draft12-session.d.ts +3 -3
- package/dist/draft12.d.cts +4 -4
- package/dist/draft12.d.ts +4 -4
- package/dist/draft13-session.d.cts +3 -3
- package/dist/draft13-session.d.ts +3 -3
- package/dist/draft13.d.cts +4 -4
- package/dist/draft13.d.ts +4 -4
- package/dist/draft14-session.d.cts +3 -3
- package/dist/draft14-session.d.ts +3 -3
- package/dist/draft14.d.cts +4 -4
- package/dist/draft14.d.ts +4 -4
- package/dist/draft15-session.d.cts +3 -3
- package/dist/draft15-session.d.ts +3 -3
- package/dist/draft15.d.cts +4 -4
- package/dist/draft15.d.ts +4 -4
- package/dist/draft16-session.d.cts +3 -3
- package/dist/draft16-session.d.ts +3 -3
- package/dist/draft16.d.cts +4 -4
- package/dist/draft16.d.ts +4 -4
- package/dist/draft17-session.d.cts +3 -3
- package/dist/draft17-session.d.ts +3 -3
- package/dist/draft17.d.cts +3 -3
- package/dist/draft17.d.ts +3 -3
- package/dist/draft18-session.cjs +8 -0
- package/dist/draft18-session.d.cts +50 -0
- package/dist/draft18-session.d.ts +50 -0
- package/dist/draft18-session.js +8 -0
- package/dist/draft18.cjs +179 -0
- package/dist/draft18.d.cts +126 -0
- package/dist/draft18.d.ts +126 -0
- package/dist/draft18.js +179 -0
- package/dist/index.cjs +7 -1
- package/dist/index.d.cts +19 -14
- package/dist/index.d.ts +19 -14
- package/dist/index.js +7 -1
- package/dist/{session-types-X-IYEGoG.d.ts → session-types-DBpCRtrL.d.ts} +1 -1
- package/dist/{session-types-C7UONex5.d.cts → session-types-sBaTRwDh.d.cts} +1 -1
- package/dist/session.cjs +5 -1
- package/dist/session.d.cts +5 -3
- package/dist/session.d.ts +5 -3
- package/dist/session.js +5 -1
- package/dist/{types-DuIO7cWK.d.cts → types-CnBuq68e.d.cts} +1 -1
- package/dist/{types-DuIO7cWK.d.ts → types-CnBuq68e.d.ts} +1 -1
- package/dist/types-Cqp10JtB.d.cts +249 -0
- package/dist/types-Cqp10JtB.d.ts +249 -0
- package/package.json +14 -2
- package/src/core/types.ts +13 -1
- package/src/drafts/draft17/error-codes.ts +72 -0
- package/src/drafts/draft18/codec.ts +1310 -0
- package/src/drafts/draft18/data-streams.ts +996 -0
- package/src/drafts/draft18/error-codes.ts +75 -0
- package/src/drafts/draft18/index.ts +122 -0
- package/src/drafts/draft18/messages.ts +56 -0
- package/src/drafts/draft18/rules.ts +85 -0
- package/src/drafts/draft18/session-fsm.ts +451 -0
- package/src/drafts/draft18/session.ts +15 -0
- package/src/drafts/draft18/types.ts +347 -0
- package/src/index.ts +9 -1
- package/src/session.ts +4 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-
|
|
2
|
-
export { F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, f as PublishState, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-
|
|
1
|
+
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-sBaTRwDh.cjs';
|
|
2
|
+
export { F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, f as PublishState, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-sBaTRwDh.cjs';
|
|
3
3
|
import { D as Draft16Message, a as Draft16MessageType } from './types-Cm9fjeYC.cjs';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-CnBuq68e.cjs';
|
|
5
5
|
|
|
6
6
|
declare function createDraft16SessionState(role: SessionStateOptionsRole): SessionState<Draft16Message, Draft16MessageType>;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-
|
|
2
|
-
export { F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, f as PublishState, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-
|
|
1
|
+
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-DBpCRtrL.js';
|
|
2
|
+
export { F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, f as PublishState, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-DBpCRtrL.js';
|
|
3
3
|
import { D as Draft16Message, a as Draft16MessageType } from './types-Cm9fjeYC.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-CnBuq68e.js';
|
|
5
5
|
|
|
6
6
|
declare function createDraft16SessionState(role: SessionStateOptionsRole): SessionState<Draft16Message, Draft16MessageType>;
|
|
7
7
|
|
package/dist/draft16.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { D as Draft16Codec, c as createDraft16Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
1
|
+
export { D as Draft16Codec, c as createDraft16Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-DbpLHKXN.cjs';
|
|
2
2
|
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft16DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft16MessageType, D as Draft16Message } from './types-Cm9fjeYC.cjs';
|
|
3
3
|
export { g as DataStreamHeader, h as Draft16BaseMessage, i as Draft16ClientSetup, j as Draft16Fetch, k as Draft16FetchCancel, l as Draft16FetchOk, m as Draft16GoAway, n as Draft16MaxRequestId, o as Draft16Namespace, p as Draft16NamespaceDone, q as Draft16Params, r as Draft16Publish, s as Draft16PublishDone, t as Draft16PublishNamespace, u as Draft16PublishNamespaceCancel, v as Draft16PublishNamespaceDone, w as Draft16PublishOk, x as Draft16RequestError, y as Draft16RequestOk, z as Draft16RequestUpdate, A as Draft16RequestsBlocked, B as Draft16ServerSetup, C as Draft16SetupParams, E as Draft16Subscribe, G as Draft16SubscribeNamespace, H as Draft16SubscribeOk, I as Draft16TrackStatus, J as Draft16Unsubscribe, K as FetchObjectPayload, L as JoiningFetch, M as LargestObject, N as StandaloneFetch, P as SubscriptionFilter, U as UnknownParam } from './types-Cm9fjeYC.cjs';
|
|
4
4
|
export { createDraft16SessionState } from './draft16-session.cjs';
|
|
5
|
-
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-
|
|
6
|
-
export { F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-
|
|
7
|
-
import { b as DecodeResult } from './types-
|
|
5
|
+
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-sBaTRwDh.cjs';
|
|
6
|
+
export { F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-sBaTRwDh.cjs';
|
|
7
|
+
import { b as DecodeResult } from './types-CnBuq68e.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Encode a subgroup stream header + objects.
|
package/dist/draft16.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { D as Draft16Codec, c as createDraft16Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
1
|
+
export { D as Draft16Codec, c as createDraft16Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-6s9d5yZm.js';
|
|
2
2
|
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft16DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft16MessageType, D as Draft16Message } from './types-Cm9fjeYC.js';
|
|
3
3
|
export { g as DataStreamHeader, h as Draft16BaseMessage, i as Draft16ClientSetup, j as Draft16Fetch, k as Draft16FetchCancel, l as Draft16FetchOk, m as Draft16GoAway, n as Draft16MaxRequestId, o as Draft16Namespace, p as Draft16NamespaceDone, q as Draft16Params, r as Draft16Publish, s as Draft16PublishDone, t as Draft16PublishNamespace, u as Draft16PublishNamespaceCancel, v as Draft16PublishNamespaceDone, w as Draft16PublishOk, x as Draft16RequestError, y as Draft16RequestOk, z as Draft16RequestUpdate, A as Draft16RequestsBlocked, B as Draft16ServerSetup, C as Draft16SetupParams, E as Draft16Subscribe, G as Draft16SubscribeNamespace, H as Draft16SubscribeOk, I as Draft16TrackStatus, J as Draft16Unsubscribe, K as FetchObjectPayload, L as JoiningFetch, M as LargestObject, N as StandaloneFetch, P as SubscriptionFilter, U as UnknownParam } from './types-Cm9fjeYC.js';
|
|
4
4
|
export { createDraft16SessionState } from './draft16-session.js';
|
|
5
|
-
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-
|
|
6
|
-
export { F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-
|
|
7
|
-
import { b as DecodeResult } from './types-
|
|
5
|
+
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-DBpCRtrL.js';
|
|
6
|
+
export { F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, e as PublishPhase, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-DBpCRtrL.js';
|
|
7
|
+
import { b as DecodeResult } from './types-CnBuq68e.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Encode a subgroup stream header + objects.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-
|
|
2
|
-
export { P as ProtocolViolation, h as SideEffect } from './session-types-
|
|
1
|
+
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-sBaTRwDh.cjs';
|
|
2
|
+
export { P as ProtocolViolation, h as SideEffect } from './session-types-sBaTRwDh.cjs';
|
|
3
3
|
import { a as Draft17MessageType, D as Draft17Message } from './types-D9eiB_9A.cjs';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-CnBuq68e.cjs';
|
|
5
5
|
|
|
6
6
|
declare class Draft17SessionFSM {
|
|
7
7
|
private _phase;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-
|
|
2
|
-
export { P as ProtocolViolation, h as SideEffect } from './session-types-
|
|
1
|
+
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-DBpCRtrL.js';
|
|
2
|
+
export { P as ProtocolViolation, h as SideEffect } from './session-types-DBpCRtrL.js';
|
|
3
3
|
import { a as Draft17MessageType, D as Draft17Message } from './types-D9eiB_9A.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-CnBuq68e.js';
|
|
5
5
|
|
|
6
6
|
declare class Draft17SessionFSM {
|
|
7
7
|
private _phase;
|
package/dist/draft17.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { D as Draft17Codec, c as createDraft17Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
1
|
+
export { D as Draft17Codec, c as createDraft17Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-D5Ss123f.cjs';
|
|
2
2
|
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft17DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft17MessageType } from './types-D9eiB_9A.cjs';
|
|
3
3
|
export { g as DataStreamHeader, h as Draft17BaseMessage, i as Draft17Fetch, j as Draft17FetchOk, k as Draft17GoAway, D as Draft17Message, l as Draft17Namespace, m as Draft17NamespaceDone, n as Draft17Params, o as Draft17Publish, p as Draft17PublishBlocked, q as Draft17PublishDone, r as Draft17PublishNamespace, s as Draft17PublishOk, t as Draft17RequestError, u as Draft17RequestOk, v as Draft17RequestUpdate, w as Draft17Setup, x as Draft17SetupOptions, y as Draft17Subscribe, z as Draft17SubscribeNamespace, A as Draft17SubscribeOk, B as Draft17TrackProperties, C as Draft17TrackStatus, E as FetchObjectPayload, J as JoiningFetch, L as LargestObject, G as StandaloneFetch, H as SubscriptionFilter, U as UnknownParam } from './types-D9eiB_9A.cjs';
|
|
4
4
|
export { Draft17SessionFSM, createDraft17SessionState } from './draft17-session.cjs';
|
|
5
|
-
export { P as ProtocolViolation, g as SessionPhase, h as SideEffect, T as TransitionResult, V as ValidationResult } from './session-types-
|
|
6
|
-
import { b as DecodeResult } from './types-
|
|
5
|
+
export { P as ProtocolViolation, g as SessionPhase, h as SideEffect, T as TransitionResult, V as ValidationResult } from './session-types-sBaTRwDh.cjs';
|
|
6
|
+
import { b as DecodeResult } from './types-CnBuq68e.cjs';
|
|
7
7
|
|
|
8
8
|
declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
|
|
9
9
|
declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
package/dist/draft17.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { D as Draft17Codec, c as createDraft17Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
1
|
+
export { D as Draft17Codec, c as createDraft17Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-D_9X0i31.js';
|
|
2
2
|
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft17DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft17MessageType } from './types-D9eiB_9A.js';
|
|
3
3
|
export { g as DataStreamHeader, h as Draft17BaseMessage, i as Draft17Fetch, j as Draft17FetchOk, k as Draft17GoAway, D as Draft17Message, l as Draft17Namespace, m as Draft17NamespaceDone, n as Draft17Params, o as Draft17Publish, p as Draft17PublishBlocked, q as Draft17PublishDone, r as Draft17PublishNamespace, s as Draft17PublishOk, t as Draft17RequestError, u as Draft17RequestOk, v as Draft17RequestUpdate, w as Draft17Setup, x as Draft17SetupOptions, y as Draft17Subscribe, z as Draft17SubscribeNamespace, A as Draft17SubscribeOk, B as Draft17TrackProperties, C as Draft17TrackStatus, E as FetchObjectPayload, J as JoiningFetch, L as LargestObject, G as StandaloneFetch, H as SubscriptionFilter, U as UnknownParam } from './types-D9eiB_9A.js';
|
|
4
4
|
export { Draft17SessionFSM, createDraft17SessionState } from './draft17-session.js';
|
|
5
|
-
export { P as ProtocolViolation, g as SessionPhase, h as SideEffect, T as TransitionResult, V as ValidationResult } from './session-types-
|
|
6
|
-
import { b as DecodeResult } from './types-
|
|
5
|
+
export { P as ProtocolViolation, g as SessionPhase, h as SideEffect, T as TransitionResult, V as ValidationResult } from './session-types-DBpCRtrL.js';
|
|
6
|
+
import { b as DecodeResult } from './types-CnBuq68e.js';
|
|
7
7
|
|
|
8
8
|
declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
|
|
9
9
|
declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkA655PHFXcjs = require('./chunk-A655PHFX.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.Draft18SessionFSM = _chunkA655PHFXcjs.Draft18SessionFSM; exports.createDraft18SessionState = _chunkA655PHFXcjs.createDraft18SessionState;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-sBaTRwDh.cjs';
|
|
2
|
+
export { P as ProtocolViolation, h as SideEffect } from './session-types-sBaTRwDh.cjs';
|
|
3
|
+
import { a as Draft18MessageType, D as Draft18Message } from './types-Cqp10JtB.cjs';
|
|
4
|
+
import './types-CnBuq68e.cjs';
|
|
5
|
+
|
|
6
|
+
declare class Draft18SessionFSM {
|
|
7
|
+
private _phase;
|
|
8
|
+
private _role;
|
|
9
|
+
private _setupDirection;
|
|
10
|
+
private _subscriptions;
|
|
11
|
+
private _publishes;
|
|
12
|
+
private _fetches;
|
|
13
|
+
private _requestIds;
|
|
14
|
+
private _pendingSubscribes;
|
|
15
|
+
private _pendingPublishes;
|
|
16
|
+
private _pendingFetches;
|
|
17
|
+
constructor(role: 'client' | 'server');
|
|
18
|
+
get phase(): SessionPhase;
|
|
19
|
+
get role(): 'client' | 'server';
|
|
20
|
+
get subscriptions(): ReadonlyMap<bigint, SubscriptionState>;
|
|
21
|
+
get announces(): ReadonlyMap<string, AnnounceState>;
|
|
22
|
+
get publishes(): ReadonlyMap<bigint, PublishState>;
|
|
23
|
+
get fetches(): ReadonlyMap<bigint, FetchState>;
|
|
24
|
+
get legalOutgoing(): ReadonlySet<Draft18MessageType>;
|
|
25
|
+
get legalIncoming(): ReadonlySet<Draft18MessageType>;
|
|
26
|
+
private checkDuplicateRequestId;
|
|
27
|
+
validateOutgoing(message: Draft18Message): ValidationResult<Draft18MessageType>;
|
|
28
|
+
receive(message: Draft18Message): TransitionResult<Draft18MessageType>;
|
|
29
|
+
send(message: Draft18Message): TransitionResult<Draft18MessageType>;
|
|
30
|
+
private applyTransition;
|
|
31
|
+
private handleSetup;
|
|
32
|
+
private handleGoAway;
|
|
33
|
+
private requireReady;
|
|
34
|
+
private handleSubscribe;
|
|
35
|
+
private handleSubscribeOk;
|
|
36
|
+
private handleRequestUpdate;
|
|
37
|
+
private handlePublish;
|
|
38
|
+
private handlePublishDone;
|
|
39
|
+
private handleFetch;
|
|
40
|
+
private handleFetchOk;
|
|
41
|
+
private handleRequestError;
|
|
42
|
+
private handleRequestOk;
|
|
43
|
+
private dequeuePending;
|
|
44
|
+
private handleReadyPhaseMessage;
|
|
45
|
+
reset(): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare function createDraft18SessionState(role: 'client' | 'server'): Draft18SessionFSM;
|
|
49
|
+
|
|
50
|
+
export { Draft18SessionFSM, SessionPhase, TransitionResult, ValidationResult, createDraft18SessionState };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, f as PublishState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-DBpCRtrL.js';
|
|
2
|
+
export { P as ProtocolViolation, h as SideEffect } from './session-types-DBpCRtrL.js';
|
|
3
|
+
import { a as Draft18MessageType, D as Draft18Message } from './types-Cqp10JtB.js';
|
|
4
|
+
import './types-CnBuq68e.js';
|
|
5
|
+
|
|
6
|
+
declare class Draft18SessionFSM {
|
|
7
|
+
private _phase;
|
|
8
|
+
private _role;
|
|
9
|
+
private _setupDirection;
|
|
10
|
+
private _subscriptions;
|
|
11
|
+
private _publishes;
|
|
12
|
+
private _fetches;
|
|
13
|
+
private _requestIds;
|
|
14
|
+
private _pendingSubscribes;
|
|
15
|
+
private _pendingPublishes;
|
|
16
|
+
private _pendingFetches;
|
|
17
|
+
constructor(role: 'client' | 'server');
|
|
18
|
+
get phase(): SessionPhase;
|
|
19
|
+
get role(): 'client' | 'server';
|
|
20
|
+
get subscriptions(): ReadonlyMap<bigint, SubscriptionState>;
|
|
21
|
+
get announces(): ReadonlyMap<string, AnnounceState>;
|
|
22
|
+
get publishes(): ReadonlyMap<bigint, PublishState>;
|
|
23
|
+
get fetches(): ReadonlyMap<bigint, FetchState>;
|
|
24
|
+
get legalOutgoing(): ReadonlySet<Draft18MessageType>;
|
|
25
|
+
get legalIncoming(): ReadonlySet<Draft18MessageType>;
|
|
26
|
+
private checkDuplicateRequestId;
|
|
27
|
+
validateOutgoing(message: Draft18Message): ValidationResult<Draft18MessageType>;
|
|
28
|
+
receive(message: Draft18Message): TransitionResult<Draft18MessageType>;
|
|
29
|
+
send(message: Draft18Message): TransitionResult<Draft18MessageType>;
|
|
30
|
+
private applyTransition;
|
|
31
|
+
private handleSetup;
|
|
32
|
+
private handleGoAway;
|
|
33
|
+
private requireReady;
|
|
34
|
+
private handleSubscribe;
|
|
35
|
+
private handleSubscribeOk;
|
|
36
|
+
private handleRequestUpdate;
|
|
37
|
+
private handlePublish;
|
|
38
|
+
private handlePublishDone;
|
|
39
|
+
private handleFetch;
|
|
40
|
+
private handleFetchOk;
|
|
41
|
+
private handleRequestError;
|
|
42
|
+
private handleRequestOk;
|
|
43
|
+
private dequeuePending;
|
|
44
|
+
private handleReadyPhaseMessage;
|
|
45
|
+
reset(): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare function createDraft18SessionState(role: 'client' | 'server'): Draft18SessionFSM;
|
|
49
|
+
|
|
50
|
+
export { Draft18SessionFSM, SessionPhase, TransitionResult, ValidationResult, createDraft18SessionState };
|
package/dist/draft18.cjs
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var _chunkA33U4WVScjs = require('./chunk-A33U4WVS.cjs');
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
var _chunkA655PHFXcjs = require('./chunk-A655PHFX.cjs');
|
|
53
|
+
require('./chunk-JL3NEW3O.cjs');
|
|
54
|
+
|
|
55
|
+
// src/drafts/draft18/error-codes.ts
|
|
56
|
+
var SessionTerminationCode = {
|
|
57
|
+
NoError: 0x0n,
|
|
58
|
+
InternalError: 0x1n,
|
|
59
|
+
Unauthorized: 0x2n,
|
|
60
|
+
ProtocolViolation: 0x3n,
|
|
61
|
+
InvalidRequestId: 0x4n,
|
|
62
|
+
DuplicateTrackAlias: 0x5n,
|
|
63
|
+
KeyValueFormattingError: 0x6n,
|
|
64
|
+
InvalidPath: 0x8n,
|
|
65
|
+
MalformedPath: 0x9n,
|
|
66
|
+
GoawayTimeout: 0x10n,
|
|
67
|
+
ControlMessageTimeout: 0x11n,
|
|
68
|
+
DataStreamTimeout: 0x12n,
|
|
69
|
+
AuthTokenCacheOverflow: 0x13n,
|
|
70
|
+
DuplicateAuthTokenAlias: 0x14n,
|
|
71
|
+
VersionNegotiationFailed: 0x15n,
|
|
72
|
+
MalformedAuthToken: 0x16n,
|
|
73
|
+
UnknownAuthTokenAlias: 0x17n,
|
|
74
|
+
ExpiredAuthToken: 0x18n,
|
|
75
|
+
InvalidAuthority: 0x19n,
|
|
76
|
+
MalformedAuthority: 0x1an
|
|
77
|
+
};
|
|
78
|
+
var RequestErrorCode = {
|
|
79
|
+
InternalError: 0x0n,
|
|
80
|
+
Unauthorized: 0x1n,
|
|
81
|
+
Timeout: 0x2n,
|
|
82
|
+
NotSupported: 0x3n,
|
|
83
|
+
MalformedAuthToken: 0x4n,
|
|
84
|
+
ExpiredAuthToken: 0x5n,
|
|
85
|
+
GoingAway: 0x6n,
|
|
86
|
+
ExcessiveLoad: 0x9n,
|
|
87
|
+
DoesNotExist: 0x10n,
|
|
88
|
+
InvalidRange: 0x11n,
|
|
89
|
+
MalformedTrack: 0x12n,
|
|
90
|
+
DuplicateSubscription: 0x19n,
|
|
91
|
+
Uninterested: 0x20n,
|
|
92
|
+
PrefixOverlap: 0x30n,
|
|
93
|
+
NamespaceTooLarge: 0x31n,
|
|
94
|
+
InvalidJoiningRequestId: 0x32n,
|
|
95
|
+
UnsupportedExtension: 0x33n,
|
|
96
|
+
Redirect: 0x34n
|
|
97
|
+
};
|
|
98
|
+
var PublishDoneCode = {
|
|
99
|
+
InternalError: 0x0n,
|
|
100
|
+
Unauthorized: 0x1n,
|
|
101
|
+
TrackEnded: 0x2n,
|
|
102
|
+
SubscriptionEnded: 0x3n,
|
|
103
|
+
GoingAway: 0x4n,
|
|
104
|
+
TooFarBehind: 0x5n,
|
|
105
|
+
Expired: 0x6n,
|
|
106
|
+
UpdateFailed: 0x8n,
|
|
107
|
+
ExcessiveLoad: 0x9n,
|
|
108
|
+
MalformedTrack: 0x12n
|
|
109
|
+
};
|
|
110
|
+
var DataStreamResetCode = {
|
|
111
|
+
InternalError: 0x0n,
|
|
112
|
+
Cancelled: 0x1n,
|
|
113
|
+
DeliveryTimeout: 0x2n,
|
|
114
|
+
SessionClosed: 0x3n,
|
|
115
|
+
GoingAway: 0x4n,
|
|
116
|
+
TooFarBehind: 0x5n,
|
|
117
|
+
UnknownObjectStatus: 0x6n,
|
|
118
|
+
ExpiredAuthToken: 0x7n,
|
|
119
|
+
ExcessiveLoad: 0x9n,
|
|
120
|
+
MalformedTrack: 0x12n
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// src/drafts/draft18/index.ts
|
|
124
|
+
var DRAFT_VERSION = 0xff000012n;
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
exports.BIDIRECTIONAL_MESSAGES = _chunkA655PHFXcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkA655PHFXcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkA655PHFXcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.DataStreamResetCode = DataStreamResetCode; exports.Draft18SessionFSM = _chunkA655PHFXcjs.Draft18SessionFSM; exports.MESSAGE_ID_MAP = _chunkA33U4WVScjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkA33U4WVScjs.MESSAGE_TYPE_MAP; exports.MSG_FETCH = _chunkA33U4WVScjs.MSG_FETCH; exports.MSG_FETCH_OK = _chunkA33U4WVScjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkA33U4WVScjs.MSG_GOAWAY; exports.MSG_NAMESPACE = _chunkA33U4WVScjs.MSG_NAMESPACE; exports.MSG_NAMESPACE_DONE = _chunkA33U4WVScjs.MSG_NAMESPACE_DONE; exports.MSG_PUBLISH = _chunkA33U4WVScjs.MSG_PUBLISH; exports.MSG_PUBLISH_BLOCKED = _chunkA33U4WVScjs.MSG_PUBLISH_BLOCKED; exports.MSG_PUBLISH_DONE = _chunkA33U4WVScjs.MSG_PUBLISH_DONE; exports.MSG_PUBLISH_NAMESPACE = _chunkA33U4WVScjs.MSG_PUBLISH_NAMESPACE; exports.MSG_PUBLISH_OK = _chunkA33U4WVScjs.MSG_PUBLISH_OK; exports.MSG_REQUEST_ERROR = _chunkA33U4WVScjs.MSG_REQUEST_ERROR; exports.MSG_REQUEST_OK = _chunkA33U4WVScjs.MSG_REQUEST_OK; exports.MSG_REQUEST_UPDATE = _chunkA33U4WVScjs.MSG_REQUEST_UPDATE; exports.MSG_SETUP = _chunkA33U4WVScjs.MSG_SETUP; exports.MSG_SUBSCRIBE = _chunkA33U4WVScjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_NAMESPACE = _chunkA33U4WVScjs.MSG_SUBSCRIBE_NAMESPACE; exports.MSG_SUBSCRIBE_OK = _chunkA33U4WVScjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_TRACKS = _chunkA33U4WVScjs.MSG_SUBSCRIBE_TRACKS; exports.MSG_TRACK_STATUS = _chunkA33U4WVScjs.MSG_TRACK_STATUS; exports.PublishDoneCode = PublishDoneCode; exports.RequestErrorCode = RequestErrorCode; exports.SERVER_ONLY_MESSAGES = _chunkA655PHFXcjs.SERVER_ONLY_MESSAGES; exports.SETUP_OPT_AUTHORITY = _chunkA33U4WVScjs.SETUP_OPT_AUTHORITY; exports.SETUP_OPT_AUTHORIZATION_TOKEN = _chunkA33U4WVScjs.SETUP_OPT_AUTHORIZATION_TOKEN; exports.SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE = _chunkA33U4WVScjs.SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE; exports.SETUP_OPT_MOQT_IMPLEMENTATION = _chunkA33U4WVScjs.SETUP_OPT_MOQT_IMPLEMENTATION; exports.SETUP_OPT_PATH = _chunkA33U4WVScjs.SETUP_OPT_PATH; exports.SessionTerminationCode = SessionTerminationCode; exports.createDataStreamDecoder = _chunkA33U4WVScjs.createDataStreamDecoder; exports.createDraft18Codec = _chunkA33U4WVScjs.createDraft18Codec; exports.createDraft18SessionState = _chunkA655PHFXcjs.createDraft18SessionState; exports.createFetchStreamDecoder = _chunkA33U4WVScjs.createFetchStreamDecoder; exports.createStreamDecoder = _chunkA33U4WVScjs.createStreamDecoder; exports.createSubgroupStreamDecoder = _chunkA33U4WVScjs.createSubgroupStreamDecoder; exports.decodeDataStream = _chunkA33U4WVScjs.decodeDataStream; exports.decodeDatagram = _chunkA33U4WVScjs.decodeDatagram; exports.decodeFetchStream = _chunkA33U4WVScjs.decodeFetchStream; exports.decodeMessage = _chunkA33U4WVScjs.decodeMessage; exports.decodeSubgroupStream = _chunkA33U4WVScjs.decodeSubgroupStream; exports.encodeDatagram = _chunkA33U4WVScjs.encodeDatagram; exports.encodeFetchStream = _chunkA33U4WVScjs.encodeFetchStream; exports.encodeMessage = _chunkA33U4WVScjs.encodeMessage; exports.encodeSubgroupStream = _chunkA33U4WVScjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkA655PHFXcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkA655PHFXcjs.getLegalOutgoing;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export { D as Draft18Codec, c as createDraft18Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-MxIhLDR5.cjs';
|
|
2
|
+
import { b as DataStreamEvent, F as FetchStreamHeader, O as ObjectPayload, S as SubgroupStreamHeader, c as Draft18DataStream, d as DatagramObject, e as FetchStream, f as SubgroupStream, a as Draft18MessageType } from './types-Cqp10JtB.cjs';
|
|
3
|
+
export { g as DataStreamHeader, h as Draft18BaseMessage, i as Draft18Fetch, j as Draft18FetchOk, k as Draft18GoAway, D as Draft18Message, l as Draft18Namespace, m as Draft18NamespaceDone, n as Draft18Params, o as Draft18Publish, p as Draft18PublishBlocked, q as Draft18PublishDone, r as Draft18PublishNamespace, s as Draft18RequestError, t as Draft18RequestOk, u as Draft18RequestUpdate, v as Draft18Setup, w as Draft18SetupOptions, x as Draft18Subscribe, y as Draft18SubscribeNamespace, z as Draft18SubscribeOk, A as Draft18SubscribeTracks, B as Draft18TrackProperties, C as Draft18TrackStatus, E as FetchObjectPayload, J as JoiningFetch, L as LargestObject, R as Redirect, G as StandaloneFetch, H as SubscriptionFilter, U as UnknownParam } from './types-Cqp10JtB.cjs';
|
|
4
|
+
export { Draft18SessionFSM, createDraft18SessionState } from './draft18-session.cjs';
|
|
5
|
+
export { P as ProtocolViolation, g as SessionPhase, h as SideEffect, T as TransitionResult, V as ValidationResult } from './session-types-sBaTRwDh.cjs';
|
|
6
|
+
import { b as DecodeResult } from './types-CnBuq68e.cjs';
|
|
7
|
+
|
|
8
|
+
declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
|
|
9
|
+
declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
|
10
|
+
declare function encodeFetchStream(stream: FetchStream): Uint8Array;
|
|
11
|
+
declare function decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupStream>;
|
|
12
|
+
declare function decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
|
|
13
|
+
declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
|
|
14
|
+
declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'fetch', bytes: Uint8Array): DecodeResult<Draft18DataStream>;
|
|
15
|
+
declare function createSubgroupStreamDecoder(): TransformStream<Uint8Array, SubgroupStreamHeader | ObjectPayload>;
|
|
16
|
+
declare function createFetchStreamDecoder(): TransformStream<Uint8Array, FetchStreamHeader | ObjectPayload>;
|
|
17
|
+
declare function createDataStreamDecoder(): TransformStream<Uint8Array, DataStreamEvent>;
|
|
18
|
+
|
|
19
|
+
declare const SessionTerminationCode: {
|
|
20
|
+
readonly NoError: 0n;
|
|
21
|
+
readonly InternalError: 1n;
|
|
22
|
+
readonly Unauthorized: 2n;
|
|
23
|
+
readonly ProtocolViolation: 3n;
|
|
24
|
+
readonly InvalidRequestId: 4n;
|
|
25
|
+
readonly DuplicateTrackAlias: 5n;
|
|
26
|
+
readonly KeyValueFormattingError: 6n;
|
|
27
|
+
readonly InvalidPath: 8n;
|
|
28
|
+
readonly MalformedPath: 9n;
|
|
29
|
+
readonly GoawayTimeout: 16n;
|
|
30
|
+
readonly ControlMessageTimeout: 17n;
|
|
31
|
+
readonly DataStreamTimeout: 18n;
|
|
32
|
+
readonly AuthTokenCacheOverflow: 19n;
|
|
33
|
+
readonly DuplicateAuthTokenAlias: 20n;
|
|
34
|
+
readonly VersionNegotiationFailed: 21n;
|
|
35
|
+
readonly MalformedAuthToken: 22n;
|
|
36
|
+
readonly UnknownAuthTokenAlias: 23n;
|
|
37
|
+
readonly ExpiredAuthToken: 24n;
|
|
38
|
+
readonly InvalidAuthority: 25n;
|
|
39
|
+
readonly MalformedAuthority: 26n;
|
|
40
|
+
};
|
|
41
|
+
type SessionTerminationCodeValue = (typeof SessionTerminationCode)[keyof typeof SessionTerminationCode];
|
|
42
|
+
declare const RequestErrorCode: {
|
|
43
|
+
readonly InternalError: 0n;
|
|
44
|
+
readonly Unauthorized: 1n;
|
|
45
|
+
readonly Timeout: 2n;
|
|
46
|
+
readonly NotSupported: 3n;
|
|
47
|
+
readonly MalformedAuthToken: 4n;
|
|
48
|
+
readonly ExpiredAuthToken: 5n;
|
|
49
|
+
readonly GoingAway: 6n;
|
|
50
|
+
readonly ExcessiveLoad: 9n;
|
|
51
|
+
readonly DoesNotExist: 16n;
|
|
52
|
+
readonly InvalidRange: 17n;
|
|
53
|
+
readonly MalformedTrack: 18n;
|
|
54
|
+
readonly DuplicateSubscription: 25n;
|
|
55
|
+
readonly Uninterested: 32n;
|
|
56
|
+
readonly PrefixOverlap: 48n;
|
|
57
|
+
readonly NamespaceTooLarge: 49n;
|
|
58
|
+
readonly InvalidJoiningRequestId: 50n;
|
|
59
|
+
readonly UnsupportedExtension: 51n;
|
|
60
|
+
readonly Redirect: 52n;
|
|
61
|
+
};
|
|
62
|
+
type RequestErrorCodeValue = (typeof RequestErrorCode)[keyof typeof RequestErrorCode];
|
|
63
|
+
declare const PublishDoneCode: {
|
|
64
|
+
readonly InternalError: 0n;
|
|
65
|
+
readonly Unauthorized: 1n;
|
|
66
|
+
readonly TrackEnded: 2n;
|
|
67
|
+
readonly SubscriptionEnded: 3n;
|
|
68
|
+
readonly GoingAway: 4n;
|
|
69
|
+
readonly TooFarBehind: 5n;
|
|
70
|
+
readonly Expired: 6n;
|
|
71
|
+
readonly UpdateFailed: 8n;
|
|
72
|
+
readonly ExcessiveLoad: 9n;
|
|
73
|
+
readonly MalformedTrack: 18n;
|
|
74
|
+
};
|
|
75
|
+
type PublishDoneCodeValue = (typeof PublishDoneCode)[keyof typeof PublishDoneCode];
|
|
76
|
+
declare const DataStreamResetCode: {
|
|
77
|
+
readonly InternalError: 0n;
|
|
78
|
+
readonly Cancelled: 1n;
|
|
79
|
+
readonly DeliveryTimeout: 2n;
|
|
80
|
+
readonly SessionClosed: 3n;
|
|
81
|
+
readonly GoingAway: 4n;
|
|
82
|
+
readonly TooFarBehind: 5n;
|
|
83
|
+
readonly UnknownObjectStatus: 6n;
|
|
84
|
+
readonly ExpiredAuthToken: 7n;
|
|
85
|
+
readonly ExcessiveLoad: 9n;
|
|
86
|
+
readonly MalformedTrack: 18n;
|
|
87
|
+
};
|
|
88
|
+
type DataStreamResetCodeValue = (typeof DataStreamResetCode)[keyof typeof DataStreamResetCode];
|
|
89
|
+
|
|
90
|
+
declare const MSG_REQUEST_UPDATE = 2n;
|
|
91
|
+
declare const MSG_SUBSCRIBE = 3n;
|
|
92
|
+
declare const MSG_SUBSCRIBE_OK = 4n;
|
|
93
|
+
declare const MSG_REQUEST_ERROR = 5n;
|
|
94
|
+
declare const MSG_PUBLISH_NAMESPACE = 6n;
|
|
95
|
+
declare const MSG_REQUEST_OK = 7n;
|
|
96
|
+
declare const MSG_NAMESPACE = 8n;
|
|
97
|
+
declare const MSG_PUBLISH_DONE = 11n;
|
|
98
|
+
declare const MSG_TRACK_STATUS = 13n;
|
|
99
|
+
declare const MSG_NAMESPACE_DONE = 14n;
|
|
100
|
+
declare const MSG_PUBLISH_BLOCKED = 15n;
|
|
101
|
+
declare const MSG_GOAWAY = 16n;
|
|
102
|
+
declare const MSG_FETCH = 22n;
|
|
103
|
+
declare const MSG_FETCH_OK = 24n;
|
|
104
|
+
declare const MSG_PUBLISH = 29n;
|
|
105
|
+
declare const MSG_PUBLISH_OK = 7n;
|
|
106
|
+
declare const MSG_SUBSCRIBE_NAMESPACE = 80n;
|
|
107
|
+
declare const MSG_SUBSCRIBE_TRACKS = 81n;
|
|
108
|
+
declare const MSG_SETUP = 12032n;
|
|
109
|
+
declare const SETUP_OPT_PATH = 1n;
|
|
110
|
+
declare const SETUP_OPT_AUTHORIZATION_TOKEN = 3n;
|
|
111
|
+
declare const SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE = 4n;
|
|
112
|
+
declare const SETUP_OPT_AUTHORITY = 5n;
|
|
113
|
+
declare const SETUP_OPT_MOQT_IMPLEMENTATION = 7n;
|
|
114
|
+
declare const MESSAGE_TYPE_MAP: ReadonlyMap<bigint, string>;
|
|
115
|
+
declare const MESSAGE_ID_MAP: ReadonlyMap<string, bigint>;
|
|
116
|
+
|
|
117
|
+
declare const CONTROL_MESSAGES: ReadonlySet<Draft18MessageType>;
|
|
118
|
+
declare const CLIENT_ONLY_MESSAGES: ReadonlySet<Draft18MessageType>;
|
|
119
|
+
declare const SERVER_ONLY_MESSAGES: ReadonlySet<Draft18MessageType>;
|
|
120
|
+
declare const BIDIRECTIONAL_MESSAGES: ReadonlySet<Draft18MessageType>;
|
|
121
|
+
declare function getLegalOutgoing(phase: string, _role: 'client' | 'server'): Set<Draft18MessageType>;
|
|
122
|
+
declare function getLegalIncoming(phase: string, role: 'client' | 'server'): Set<Draft18MessageType>;
|
|
123
|
+
|
|
124
|
+
declare const DRAFT_VERSION = 4278190098n;
|
|
125
|
+
|
|
126
|
+
export { BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DataStreamEvent, DataStreamResetCode, type DataStreamResetCodeValue, DatagramObject, Draft18DataStream, Draft18MessageType, FetchStream, FetchStreamHeader, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_FETCH, MSG_FETCH_OK, MSG_GOAWAY, MSG_NAMESPACE, MSG_NAMESPACE_DONE, MSG_PUBLISH, MSG_PUBLISH_BLOCKED, MSG_PUBLISH_DONE, MSG_PUBLISH_NAMESPACE, MSG_PUBLISH_OK, MSG_REQUEST_ERROR, MSG_REQUEST_OK, MSG_REQUEST_UPDATE, MSG_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_NAMESPACE, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_TRACKS, MSG_TRACK_STATUS, ObjectPayload, PublishDoneCode, type PublishDoneCodeValue, RequestErrorCode, type RequestErrorCodeValue, SERVER_ONLY_MESSAGES, SETUP_OPT_AUTHORITY, SETUP_OPT_AUTHORIZATION_TOKEN, SETUP_OPT_MAX_AUTH_TOKEN_CACHE_SIZE, SETUP_OPT_MOQT_IMPLEMENTATION, SETUP_OPT_PATH, SessionTerminationCode, type SessionTerminationCodeValue, SubgroupStream, SubgroupStreamHeader, createDataStreamDecoder, createFetchStreamDecoder, createSubgroupStreamDecoder, decodeDataStream, decodeDatagram, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|