@moq/net 0.3.1 → 0.3.3
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/broadcast.d.ts.map +1 -1
- package/broadcast.js +3 -2
- package/broadcast.js.map +1 -1
- package/connection/accept.js +2 -1
- package/connection/accept.js.map +1 -1
- package/connection/browser.d.ts.map +1 -1
- package/connection/browser.js +15 -12
- package/connection/browser.js.map +1 -1
- package/connection/connect.d.ts.map +1 -1
- package/connection/connect.js +2 -1
- package/connection/connect.js.map +1 -1
- package/connection/handshake.d.ts +7 -4
- package/connection/handshake.d.ts.map +1 -1
- package/connection/handshake.js +17 -5
- package/connection/handshake.js.map +1 -1
- package/error.d.ts +14 -0
- package/error.d.ts.map +1 -1
- package/error.js +15 -0
- package/error.js.map +1 -1
- package/ietf/aliases.d.ts +73 -5
- package/ietf/aliases.d.ts.map +1 -1
- package/ietf/aliases.js +121 -14
- package/ietf/aliases.js.map +1 -1
- package/ietf/cluster.d.ts +141 -0
- package/ietf/cluster.d.ts.map +1 -0
- package/ietf/cluster.js +204 -0
- package/ietf/cluster.js.map +1 -0
- package/ietf/connection.d.ts +8 -1
- package/ietf/connection.d.ts.map +1 -1
- package/ietf/connection.js +19 -4
- package/ietf/connection.js.map +1 -1
- package/ietf/index.d.ts +1 -0
- package/ietf/index.d.ts.map +1 -1
- package/ietf/index.js +2 -0
- package/ietf/index.js.map +1 -1
- package/ietf/parameters.d.ts +11 -0
- package/ietf/parameters.d.ts.map +1 -1
- package/ietf/parameters.js +25 -1
- package/ietf/parameters.js.map +1 -1
- package/ietf/publish_namespace.d.ts +16 -2
- package/ietf/publish_namespace.d.ts.map +1 -1
- package/ietf/publish_namespace.js +25 -6
- package/ietf/publish_namespace.js.map +1 -1
- package/ietf/publisher.d.ts +11 -4
- package/ietf/publisher.d.ts.map +1 -1
- package/ietf/publisher.js +13 -8
- package/ietf/publisher.js.map +1 -1
- package/ietf/subscribe_namespace.d.ts +21 -3
- package/ietf/subscribe_namespace.d.ts.map +1 -1
- package/ietf/subscribe_namespace.js +31 -9
- package/ietf/subscribe_namespace.js.map +1 -1
- package/ietf/subscriber.d.ts +8 -3
- package/ietf/subscriber.d.ts.map +1 -1
- package/ietf/subscriber.js +219 -40
- package/ietf/subscriber.js.map +1 -1
- package/internal.d.ts +16 -1
- package/internal.d.ts.map +1 -1
- package/internal.js.map +1 -1
- package/lite/announce.d.ts +1 -2
- package/lite/announce.d.ts.map +1 -1
- package/lite/announce.js +4 -9
- package/lite/announce.js.map +1 -1
- package/lite/connection.d.ts +18 -2
- package/lite/connection.d.ts.map +1 -1
- package/lite/connection.js +36 -5
- package/lite/connection.js.map +1 -1
- package/lite/probe.d.ts +18 -2
- package/lite/probe.d.ts.map +1 -1
- package/lite/probe.js +24 -22
- package/lite/probe.js.map +1 -1
- package/lite/publisher.d.ts +1 -1
- package/lite/publisher.d.ts.map +1 -1
- package/lite/publisher.js +47 -15
- package/lite/publisher.js.map +1 -1
- package/lite/setup.d.ts +1 -1
- package/lite/setup.d.ts.map +1 -1
- package/lite/setup.js +1 -1
- package/lite/setup.js.map +1 -1
- package/lite/subscriber.d.ts +1 -1
- package/lite/subscriber.d.ts.map +1 -1
- package/lite/subscriber.js +10 -5
- package/lite/subscriber.js.map +1 -1
- package/lite/version.d.ts +7 -0
- package/lite/version.d.ts.map +1 -1
- package/lite/version.js +17 -0
- package/lite/version.js.map +1 -1
- package/{lite/origin.d.ts → origin.d.ts} +24 -0
- package/origin.d.ts.map +1 -0
- package/{lite/origin.js → origin.js} +24 -0
- package/origin.js.map +1 -0
- package/package.json +3 -2
- package/path.d.ts +29 -0
- package/path.d.ts.map +1 -1
- package/path.js +51 -0
- package/path.js.map +1 -1
- package/track.d.ts.map +1 -1
- package/track.js +35 -14
- package/track.js.map +1 -1
- package/lite/origin.d.ts.map +0 -1
- package/lite/origin.js.map +0 -1
package/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACrC,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAItD;CACD;AAcD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAIjD;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAEzC;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAa3C"}
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACrC,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAItD;CACD;AAED;;;;;;;;GAQG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC3C,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAGzD;CACD;AAcD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAIjD;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAEzC;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAa3C"}
|
package/error.js
CHANGED
|
@@ -36,6 +36,21 @@ export class RemoteError extends Error {
|
|
|
36
36
|
this.code = code;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* A peer broke the protocol in a way the spec says must end the session.
|
|
41
|
+
*
|
|
42
|
+
* Thrown where the violation is detected, rather than handled there: a decoder has no session
|
|
43
|
+
* to close. The dispatch that owns the session watches for it and closes, so a nonconforming
|
|
44
|
+
* peer cannot repeat the violation on the next stream.
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export class ProtocolViolation extends Error {
|
|
49
|
+
constructor(message, options) {
|
|
50
|
+
super(message, options);
|
|
51
|
+
this.name = "ProtocolViolation";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
39
54
|
function streamCode(err) {
|
|
40
55
|
if (typeof err !== "object" || err === null)
|
|
41
56
|
return undefined;
|
package/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACrC,wCAAwC;IAC/B,IAAI,CAAS;IAEtB,YAAY,IAAY,EAAE,OAA6B;QACtD,KAAK,CAAC,iBAAiB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;CACD;AAKD,SAAS,UAAU,CAAC,GAAY;IAC/B,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAE9D,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,GAAsB,CAAC;IAC3D,IAAI,MAAM,KA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C,IAAI,IAAI,eAAe,CAAC;AAC/C,CAAC","sourcesContent":["/**\n * Errors, including the code a peer reports when it resets a stream.\n *\n * @module\n */\n\n/**\n * An error the peer reported by resetting a stream, carrying the raw code it sent.\n *\n * The codes are not standardized, so this deliberately does not translate one into a local\n * error: the number means whatever the peer's implementation says it means. A read or write\n * rejects with this on every transport, so branch on {@link code} rather than feature-detecting\n * `WebTransportError`, which a non-browser runtime never defines and the WebSocket fallback\n * never throws.\n *\n * Code 0 is what a transport sends when a stream is dropped or aborted with no code of its own.\n *\n * ```ts\n * try {\n * frame = await group.readFrame();\n * } catch (err) {\n * // Whatever this peer's code 2 means to it.\n * if (err instanceof RemoteError && err.code === 2) return;\n * throw err;\n * }\n * ```\n *\n * @public\n */\nexport class RemoteError extends Error {\n\t/** The code the peer sent, verbatim. */\n\treadonly code: number;\n\n\tconstructor(code: number, options?: { cause?: unknown }) {\n\t\tsuper(`remote error: ${code}`, options);\n\t\tthis.name = \"RemoteError\";\n\t\tthis.code = code;\n\t}\n}\n\n/** The WebTransport-shaped fields a stream reset code arrives in. */\ntype StreamErrorLike = { source?: unknown; streamErrorCode?: unknown };\n\nfunction streamCode(err: unknown): number | undefined {\n\tif (typeof err !== \"object\" || err === null) return undefined;\n\n\tconst { source, streamErrorCode } = err as StreamErrorLike;\n\tif (source !== \"stream\" || typeof streamErrorCode !== \"number\") return undefined;\n\n\treturn streamErrorCode;\n}\n\n/**\n * Decode a transport failure into a {@link RemoteError} error when it carries a stream reset code,\n * otherwise pass it through.\n *\n * Native WebTransport rejects with a `WebTransportError`; the WebSocket fallback mints an error\n * with the same `source`/`streamErrorCode` fields. Reading the fields rather than the class\n * covers both, and works in a runtime with no `WebTransportError` at all.\n *\n * @internal Called at the transport boundary so the raw error never reaches an application.\n */\nexport function fromTransport(err: unknown): Error {\n\tconst code = streamCode(err);\n\tif (code === undefined) return error(err);\n\treturn new RemoteError(code, { cause: err });\n}\n\n/**\n * Coerce an unknown thrown value into an `Error`.\n *\n * @internal\n */\nexport function error(err: unknown): Error {\n\treturn err instanceof Error ? err : new Error(String(err));\n}\n\n/**\n * Format an error into a non-empty, human-readable string for logging.\n *\n * Safari always leaves `WebTransportError.message` blank, so a bare `err.message` degrades to\n * an empty string and the reason is lost. This falls back to the error type name and appends\n * the WebTransport `source` and application `streamErrorCode`, so the log line always says\n * something.\n */\nexport function reason(err: unknown): string {\n\tconst e = error(err);\n\n\t// WebTransportError carries the failure origin and the peer's application error code,\n\t// often the only identifying detail since WebKit leaves `message` empty.\n\tif (typeof WebTransportError !== \"undefined\" && e instanceof WebTransportError) {\n\t\tconst parts = [`source=${e.source}`];\n\t\tif (e.streamErrorCode !== null) parts.push(`code=${e.streamErrorCode}`);\n\t\tconst detail = parts.join(\" \");\n\t\treturn e.message ? `${e.message} (${detail})` : `WebTransportError: ${detail}`;\n\t}\n\n\treturn e.message || e.name || \"unknown error\";\n}\n"]}
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACrC,wCAAwC;IAC/B,IAAI,CAAS;IAEtB,YAAY,IAAY,EAAE,OAA6B;QACtD,KAAK,CAAC,iBAAiB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;CACD;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC3C,YAAY,OAAe,EAAE,OAA6B;QACzD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACjC,CAAC;CACD;AAKD,SAAS,UAAU,CAAC,GAAY;IAC/B,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG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O,KAAK,MAAM,GAAG,CAAC,CAAC,CAAC,sBAAsB,MAAM,EAAE,CAAC;IAChF,CAAC;IAED,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,IAAI,eAAe,CAAC;AAC/C,CAAC","sourcesContent":["/**\n * Errors, including the code a peer reports when it resets a stream.\n *\n * @module\n */\n\n/**\n * An error the peer reported by resetting a stream, carrying the raw code it sent.\n *\n * The codes are not standardized, so this deliberately does not translate one into a local\n * error: the number means whatever the peer's implementation says it means. A read or write\n * rejects with this on every transport, so branch on {@link code} rather than feature-detecting\n * `WebTransportError`, which a non-browser runtime never defines and the WebSocket fallback\n * never throws.\n *\n * Code 0 is what a transport sends when a stream is dropped or aborted with no code of its own.\n *\n * ```ts\n * try {\n * frame = await group.readFrame();\n * } catch (err) {\n * // Whatever this peer's code 2 means to it.\n * if (err instanceof RemoteError && err.code === 2) return;\n * throw err;\n * }\n * ```\n *\n * @public\n */\nexport class RemoteError extends Error {\n\t/** The code the peer sent, verbatim. */\n\treadonly code: number;\n\n\tconstructor(code: number, options?: { cause?: unknown }) {\n\t\tsuper(`remote error: ${code}`, options);\n\t\tthis.name = \"RemoteError\";\n\t\tthis.code = code;\n\t}\n}\n\n/**\n * A peer broke the protocol in a way the spec says must end the session.\n *\n * Thrown where the violation is detected, rather than handled there: a decoder has no session\n * to close. The dispatch that owns the session watches for it and closes, so a nonconforming\n * peer cannot repeat the violation on the next stream.\n *\n * @internal\n */\nexport class ProtocolViolation extends Error {\n\tconstructor(message: string, options?: { cause?: unknown }) {\n\t\tsuper(message, options);\n\t\tthis.name = \"ProtocolViolation\";\n\t}\n}\n\n/** The WebTransport-shaped fields a stream reset code arrives in. */\ntype StreamErrorLike = { source?: unknown; streamErrorCode?: unknown };\n\nfunction streamCode(err: unknown): number | undefined {\n\tif (typeof err !== \"object\" || err === null) return undefined;\n\n\tconst { source, streamErrorCode } = err as StreamErrorLike;\n\tif (source !== \"stream\" || typeof streamErrorCode !== \"number\") return undefined;\n\n\treturn streamErrorCode;\n}\n\n/**\n * Decode a transport failure into a {@link RemoteError} error when it carries a stream reset code,\n * otherwise pass it through.\n *\n * Native WebTransport rejects with a `WebTransportError`; the WebSocket fallback mints an error\n * with the same `source`/`streamErrorCode` fields. Reading the fields rather than the class\n * covers both, and works in a runtime with no `WebTransportError` at all.\n *\n * @internal Called at the transport boundary so the raw error never reaches an application.\n */\nexport function fromTransport(err: unknown): Error {\n\tconst code = streamCode(err);\n\tif (code === undefined) return error(err);\n\treturn new RemoteError(code, { cause: err });\n}\n\n/**\n * Coerce an unknown thrown value into an `Error`.\n *\n * @internal\n */\nexport function error(err: unknown): Error {\n\treturn err instanceof Error ? err : new Error(String(err));\n}\n\n/**\n * Format an error into a non-empty, human-readable string for logging.\n *\n * Safari always leaves `WebTransportError.message` blank, so a bare `err.message` degrades to\n * an empty string and the reason is lost. This falls back to the error type name and appends\n * the WebTransport `source` and application `streamErrorCode`, so the log line always says\n * something.\n */\nexport function reason(err: unknown): string {\n\tconst e = error(err);\n\n\t// WebTransportError carries the failure origin and the peer's application error code,\n\t// often the only identifying detail since WebKit leaves `message` empty.\n\tif (typeof WebTransportError !== \"undefined\" && e instanceof WebTransportError) {\n\t\tconst parts = [`source=${e.source}`];\n\t\tif (e.streamErrorCode !== null) parts.push(`code=${e.streamErrorCode}`);\n\t\tconst detail = parts.join(\" \");\n\t\treturn e.message ? `${e.message} (${detail})` : `WebTransportError: ${detail}`;\n\t}\n\n\treturn e.message || e.name || \"unknown error\";\n}\n"]}
|
package/ietf/aliases.d.ts
CHANGED
|
@@ -1,11 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The full track name an alias is bound to.
|
|
3
|
+
*
|
|
4
|
+
* Kept as two components rather than one joined string: a track name may contain the same
|
|
5
|
+
* separator a broadcast path uses, so `a` + `b/c` and `a/b` + `c` would otherwise compare
|
|
6
|
+
* equal and turn a genuine collision into apparent sharing.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export type TrackIdentity = {
|
|
10
|
+
broadcast: string;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Thrown when a group arrives for a subscription we already cancelled.
|
|
15
|
+
*
|
|
16
|
+
* The publisher only stops once our cancellation reaches it, so objects keep arriving for
|
|
17
|
+
* at least a round trip afterwards. Draft-19 section 11.1 asks us to keep enough state to
|
|
18
|
+
* discard them quickly "rather than treating them as belonging to an unknown Track Alias".
|
|
19
|
+
*
|
|
20
|
+
* This makes the window quiet, not safe. Once a publisher reassigns the alias the tombstone
|
|
21
|
+
* is reclaimed, and nothing on a group stream distinguishes the old subscription's objects
|
|
22
|
+
* from the new one's. Cancelling promptly is what bounds the exposure to a round trip.
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare class RetiredTrackAlias extends Error {
|
|
26
|
+
constructor(alias: bigint);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Thrown when a publisher gives one alias to two subscriptions of the same track.
|
|
30
|
+
*
|
|
31
|
+
* Draft-19 section 5.1 permits this and expects the subscriber to demux by re-applying
|
|
32
|
+
* each subscription's filter. Ours are all LargestObject, so they are indistinguishable and
|
|
33
|
+
* we cannot, which costs the one subscription. It is not a protocol error, so it must not
|
|
34
|
+
* take the session down with it.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare class SharedTrackAlias extends Error {
|
|
38
|
+
constructor(alias: bigint);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Thrown when a publisher points one alias at two different tracks at once, which
|
|
42
|
+
* draft-19 section 11.1 makes fatal to the session.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare class DuplicateTrackAlias extends Error {
|
|
46
|
+
constructor(alias: bigint);
|
|
47
|
+
}
|
|
1
48
|
/** Resolves publisher-chosen track aliases after control/data stream reordering. @internal */
|
|
2
49
|
export declare class TrackAliases<T> {
|
|
3
50
|
#private;
|
|
4
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Waits briefly for an alias to be established by SUBSCRIBE_OK or PUBLISH.
|
|
53
|
+
*
|
|
54
|
+
* Throws {@link RetiredTrackAlias} at once for an alias we cancelled, rather than
|
|
55
|
+
* waiting out the timeout for a binding that is never coming.
|
|
56
|
+
*/
|
|
5
57
|
get(alias: bigint): Promise<T>;
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Establishes an alias and releases any data streams waiting for it.
|
|
60
|
+
*
|
|
61
|
+
* `track` is the full track name the alias was bound to, which is what decides whether a
|
|
62
|
+
* repeat is the legal sharing of an alias across subscriptions to one track
|
|
63
|
+
* ({@link SharedTrackAlias}) or the collision that must fail the session
|
|
64
|
+
* ({@link DuplicateTrackAlias}).
|
|
65
|
+
*/
|
|
66
|
+
set(alias: bigint, value: T, track: TrackIdentity): void;
|
|
67
|
+
/**
|
|
68
|
+
* Retires an alias whose subscription was cancelled, so groups still in flight for it
|
|
69
|
+
* are discarded promptly instead of reported as unknown.
|
|
70
|
+
*
|
|
71
|
+
* Only retires an alias that still belongs to the supplied value: a later subscription
|
|
72
|
+
* may already have reclaimed it, and that binding outranks a departing owner.
|
|
73
|
+
*
|
|
74
|
+
* Returns whether this caller still owned the binding, so metadata keyed by the alias is
|
|
75
|
+
* only torn down by the owner and never out from under whoever reclaimed it.
|
|
76
|
+
*/
|
|
77
|
+
retire(alias: bigint, value: T): boolean;
|
|
10
78
|
}
|
|
11
79
|
//# sourceMappingURL=aliases.d.ts.map
|
package/ietf/aliases.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/ietf/aliases.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/ietf/aliases.ts"],"names":[],"mappings":"AAiBA;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAMhE;;;;;;;;;;;GAWG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC3C,YAAY,KAAK,EAAE,MAAM,EAGxB;CACD;AAED;;;;;;;;GAQG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IAC1C,YAAY,KAAK,EAAE,MAAM,EAGxB;CACD;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,KAAK,EAAE,MAAM,EAGxB;CACD;AAED,8FAA8F;AAC9F,qBAAa,YAAY,CAAC,CAAC;;IAQ1B;;;;;OAKG;IACG,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAyBnC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,QAehD;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAcvC;CAOD"}
|
package/ietf/aliases.js
CHANGED
|
@@ -1,13 +1,83 @@
|
|
|
1
1
|
/* @ts-self-types="./aliases.d.ts" */
|
|
2
2
|
const TRACK_ALIAS_TIMEOUT_MS = 1000;
|
|
3
|
+
/**
|
|
4
|
+
* How many cancelled aliases to remember. Objects keep arriving for about a round trip
|
|
5
|
+
* after we cancel, so a handful covers the window, while the cap keeps a long session with
|
|
6
|
+
* heavy subscription churn from accumulating tombstones for its whole lifetime.
|
|
7
|
+
*
|
|
8
|
+
* The bound is a count rather than a deadline, so eviction stays synchronous with
|
|
9
|
+
* retirement instead of needing a timer. The trade is that a session cancelling more than
|
|
10
|
+
* this many distinct aliases inside one round trip evicts a tombstone whose objects are
|
|
11
|
+
* still arriving; those fall back to the unknown-alias wait, which is the old behavior
|
|
12
|
+
* rather than a new failure.
|
|
13
|
+
*/
|
|
14
|
+
const RETIRED_ALIAS_CAPACITY = 64;
|
|
15
|
+
function sameTrack(a, b) {
|
|
16
|
+
return a.broadcast === b.broadcast && a.name === b.name;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Thrown when a group arrives for a subscription we already cancelled.
|
|
20
|
+
*
|
|
21
|
+
* The publisher only stops once our cancellation reaches it, so objects keep arriving for
|
|
22
|
+
* at least a round trip afterwards. Draft-19 section 11.1 asks us to keep enough state to
|
|
23
|
+
* discard them quickly "rather than treating them as belonging to an unknown Track Alias".
|
|
24
|
+
*
|
|
25
|
+
* This makes the window quiet, not safe. Once a publisher reassigns the alias the tombstone
|
|
26
|
+
* is reclaimed, and nothing on a group stream distinguishes the old subscription's objects
|
|
27
|
+
* from the new one's. Cancelling promptly is what bounds the exposure to a round trip.
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export class RetiredTrackAlias extends Error {
|
|
31
|
+
constructor(alias) {
|
|
32
|
+
super(`track alias retired: ${alias}`);
|
|
33
|
+
this.name = "RetiredTrackAlias";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Thrown when a publisher gives one alias to two subscriptions of the same track.
|
|
38
|
+
*
|
|
39
|
+
* Draft-19 section 5.1 permits this and expects the subscriber to demux by re-applying
|
|
40
|
+
* each subscription's filter. Ours are all LargestObject, so they are indistinguishable and
|
|
41
|
+
* we cannot, which costs the one subscription. It is not a protocol error, so it must not
|
|
42
|
+
* take the session down with it.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export class SharedTrackAlias extends Error {
|
|
46
|
+
constructor(alias) {
|
|
47
|
+
super(`track alias shared by another subscription: ${alias}`);
|
|
48
|
+
this.name = "SharedTrackAlias";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Thrown when a publisher points one alias at two different tracks at once, which
|
|
53
|
+
* draft-19 section 11.1 makes fatal to the session.
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
export class DuplicateTrackAlias extends Error {
|
|
57
|
+
constructor(alias) {
|
|
58
|
+
super(`duplicate track alias: ${alias}`);
|
|
59
|
+
this.name = "DuplicateTrackAlias";
|
|
60
|
+
}
|
|
61
|
+
}
|
|
3
62
|
/** Resolves publisher-chosen track aliases after control/data stream reordering. @internal */
|
|
4
63
|
export class TrackAliases {
|
|
5
64
|
#active = new Map();
|
|
6
65
|
#pending = new Map();
|
|
7
|
-
/**
|
|
66
|
+
/** Aliases whose subscription we cancelled, in retirement order so the oldest is forgotten first. */
|
|
67
|
+
#retired = [];
|
|
68
|
+
#retiredSet = new Set();
|
|
69
|
+
/**
|
|
70
|
+
* Waits briefly for an alias to be established by SUBSCRIBE_OK or PUBLISH.
|
|
71
|
+
*
|
|
72
|
+
* Throws {@link RetiredTrackAlias} at once for an alias we cancelled, rather than
|
|
73
|
+
* waiting out the timeout for a binding that is never coming.
|
|
74
|
+
*/
|
|
8
75
|
async get(alias) {
|
|
9
|
-
|
|
10
|
-
|
|
76
|
+
const bound = this.#active.get(alias);
|
|
77
|
+
if (bound !== undefined)
|
|
78
|
+
return bound.value;
|
|
79
|
+
if (this.#retiredSet.has(alias))
|
|
80
|
+
throw new RetiredTrackAlias(alias);
|
|
11
81
|
const { promise, resolve } = Promise.withResolvers();
|
|
12
82
|
let resolvers = this.#pending.get(alias);
|
|
13
83
|
if (!resolvers) {
|
|
@@ -29,24 +99,61 @@ export class TrackAliases {
|
|
|
29
99
|
this.#pending.delete(alias);
|
|
30
100
|
}
|
|
31
101
|
}
|
|
32
|
-
/**
|
|
33
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Establishes an alias and releases any data streams waiting for it.
|
|
104
|
+
*
|
|
105
|
+
* `track` is the full track name the alias was bound to, which is what decides whether a
|
|
106
|
+
* repeat is the legal sharing of an alias across subscriptions to one track
|
|
107
|
+
* ({@link SharedTrackAlias}) or the collision that must fail the session
|
|
108
|
+
* ({@link DuplicateTrackAlias}).
|
|
109
|
+
*/
|
|
110
|
+
set(alias, value, track) {
|
|
34
111
|
const active = this.#active.get(alias);
|
|
35
|
-
if (
|
|
36
|
-
if (active
|
|
37
|
-
|
|
38
|
-
|
|
112
|
+
if (active !== undefined) {
|
|
113
|
+
if (active.value === value)
|
|
114
|
+
return;
|
|
115
|
+
throw sameTrack(active.track, track) ? new SharedTrackAlias(alias) : new DuplicateTrackAlias(alias);
|
|
39
116
|
}
|
|
40
|
-
|
|
117
|
+
// Our subscription is gone, so the publisher is free to point the alias somewhere
|
|
118
|
+
// new. Reclaiming it also drops the tombstone early.
|
|
119
|
+
this.#forget(alias);
|
|
120
|
+
this.#active.set(alias, { value, track });
|
|
41
121
|
const resolvers = this.#pending.get(alias);
|
|
42
122
|
this.#pending.delete(alias);
|
|
43
123
|
for (const resolve of resolvers ?? [])
|
|
44
124
|
resolve(value);
|
|
45
125
|
}
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Retires an alias whose subscription was cancelled, so groups still in flight for it
|
|
128
|
+
* are discarded promptly instead of reported as unknown.
|
|
129
|
+
*
|
|
130
|
+
* Only retires an alias that still belongs to the supplied value: a later subscription
|
|
131
|
+
* may already have reclaimed it, and that binding outranks a departing owner.
|
|
132
|
+
*
|
|
133
|
+
* Returns whether this caller still owned the binding, so metadata keyed by the alias is
|
|
134
|
+
* only torn down by the owner and never out from under whoever reclaimed it.
|
|
135
|
+
*/
|
|
136
|
+
retire(alias, value) {
|
|
137
|
+
if (this.#active.get(alias)?.value !== value)
|
|
138
|
+
return false;
|
|
139
|
+
this.#active.delete(alias);
|
|
140
|
+
if (this.#retiredSet.has(alias))
|
|
141
|
+
return true;
|
|
142
|
+
this.#retiredSet.add(alias);
|
|
143
|
+
this.#retired.push(alias);
|
|
144
|
+
while (this.#retired.length > RETIRED_ALIAS_CAPACITY) {
|
|
145
|
+
const oldest = this.#retired.shift();
|
|
146
|
+
if (oldest !== undefined)
|
|
147
|
+
this.#retiredSet.delete(oldest);
|
|
148
|
+
}
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
#forget(alias) {
|
|
152
|
+
if (!this.#retiredSet.delete(alias))
|
|
153
|
+
return;
|
|
154
|
+
const at = this.#retired.indexOf(alias);
|
|
155
|
+
if (at !== -1)
|
|
156
|
+
this.#retired.splice(at, 1);
|
|
50
157
|
}
|
|
51
158
|
}
|
|
52
159
|
//# sourceMappingURL=aliases.js.map
|
package/ietf/aliases.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../src/ietf/aliases.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAIpC,8FAA8F;AAC9F,MAAM,OAAO,YAAY;IACxB,OAAO,GAAG,IAAI,GAAG,EAAa,CAAC;IAC/B,QAAQ,GAAG,IAAI,GAAG,EAA4B,CAAC;IAE/C,+EAA+E;IAC/E,KAAK,CAAC,GAAG,CAAC,KAAa;QACtB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAM,CAAC;QAEjE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,aAAa,EAAK,CAAC;QACxD,IAAI,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,EAAE,CAAC;YAChB,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YACtB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACrC,CAAC;QACD,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAEvB,IAAI,KAAgD,CAAC;QACrD,MAAM,OAAO,GA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AK,CAAC,CAAC;IACvD,CAAC;IAED,uEAAuE;IACvE,MAAM,CAAC,KAAa,EAAE,KAAQ;QAC7B,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK;YAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC;CACD","sourcesContent":["const TRACK_ALIAS_TIMEOUT_MS = 1000;\n\ntype Resolver<T> = PromiseWithResolvers<T>[\"resolve\"];\n\n/** Resolves publisher-chosen track aliases after control/data stream reordering. @internal */\nexport class TrackAliases<T> {\n\t#active = new Map<bigint, T>();\n\t#pending = new Map<bigint, Set<Resolver<T>>>();\n\n\t/** Waits briefly for an alias to be established by SUBSCRIBE_OK or PUBLISH. */\n\tasync get(alias: bigint): Promise<T> {\n\t\tif (this.#active.has(alias)) return this.#active.get(alias) as T;\n\n\t\tconst { promise, resolve } = Promise.withResolvers<T>();\n\t\tlet resolvers = this.#pending.get(alias);\n\t\tif (!resolvers) {\n\t\t\tresolvers = new Set();\n\t\t\tthis.#pending.set(alias, resolvers);\n\t\t}\n\t\tresolvers.add(resolve);\n\n\t\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\t\tconst timeout = new Promise<never>((_, reject) => {\n\t\t\ttimer = setTimeout(() => reject(new Error(`unknown track alias: ${alias}`)), TRACK_ALIAS_TIMEOUT_MS);\n\t\t});\n\n\t\ttry {\n\t\t\treturn await Promise.race([promise, timeout]);\n\t\t} finally {\n\t\t\tclearTimeout(timer);\n\t\t\tresolvers.delete(resolve);\n\t\t\tif (this.#pending.get(alias) === resolvers && resolvers.size === 0) this.#pending.delete(alias);\n\t\t}\n\t}\n\n\t/** Establishes an alias and releases any data streams waiting for it. */\n\tset(alias: bigint, value: T) {\n\t\tconst active = this.#active.get(alias);\n\t\tif (this.#active.has(alias)) {\n\t\t\tif (active !== value) throw new Error(`duplicate track alias: ${alias}`);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#active.set(alias, value);\n\t\tconst resolvers = this.#pending.get(alias);\n\t\tthis.#pending.delete(alias);\n\t\tfor (const resolve of resolvers ?? []) resolve(value);\n\t}\n\n\t/** Removes an alias only if it still belongs to the supplied value. */\n\tdelete(alias: bigint, value: T) {\n\t\tif (this.#active.get(alias) === value) this.#active.delete(alias);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../src/ietf/aliases.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAclC,SAAS,SAAS,CAAC,CAAgB,EAAE,CAAgB;IACpD,OAAO,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC;AACzD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC3C,YAAY,KAAa;QACxB,KAAK,CAAC,wBAAwB,KAAK,EAAE,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACjC,CAAC;CACD;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAC1C,YAAY,KAAa;QACxB,KAAK,CAAC,+CAA+C,KAAK,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IAChC,CAAC;CACD;AAED;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC7C,YAAY,KAAa;QACxB,KAAK,CAAC,0BAA0B,KAAK,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACnC,CAAC;CACD;AAED,8FAA8F;AAC9F,MAAM,OAAO,YAAY;IACxB,OAAO,GAAG,IAAI,GAAG,EAA8C,CAAC;IAChE,QAAQ,GAAG,IA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AC;QAC3D,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAE3B,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAC7C,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAE1B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,sBAAsB,EAAE,CAAC;YACtD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACrC,IAAI,MAAM,KAAK,SAAS;gBAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,CAAC,KAAa;QACpB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC;YAAE,OAAO;QAC5C,MAAM,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,EAAE,KAAK,CAAC,CAAC;YAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC;CACD","sourcesContent":["const TRACK_ALIAS_TIMEOUT_MS = 1000;\n\n/**\n * How many cancelled aliases to remember. Objects keep arriving for about a round trip\n * after we cancel, so a handful covers the window, while the cap keeps a long session with\n * heavy subscription churn from accumulating tombstones for its whole lifetime.\n *\n * The bound is a count rather than a deadline, so eviction stays synchronous with\n * retirement instead of needing a timer. The trade is that a session cancelling more than\n * this many distinct aliases inside one round trip evicts a tombstone whose objects are\n * still arriving; those fall back to the unknown-alias wait, which is the old behavior\n * rather than a new failure.\n */\nconst RETIRED_ALIAS_CAPACITY = 64;\n\ntype Resolver<T> = PromiseWithResolvers<T>[\"resolve\"];\n\n/**\n * The full track name an alias is bound to.\n *\n * Kept as two components rather than one joined string: a track name may contain the same\n * separator a broadcast path uses, so `a` + `b/c` and `a/b` + `c` would otherwise compare\n * equal and turn a genuine collision into apparent sharing.\n * @internal\n */\nexport type TrackIdentity = { broadcast: string; name: string };\n\nfunction sameTrack(a: TrackIdentity, b: TrackIdentity): boolean {\n\treturn a.broadcast === b.broadcast && a.name === b.name;\n}\n\n/**\n * Thrown when a group arrives for a subscription we already cancelled.\n *\n * The publisher only stops once our cancellation reaches it, so objects keep arriving for\n * at least a round trip afterwards. Draft-19 section 11.1 asks us to keep enough state to\n * discard them quickly \"rather than treating them as belonging to an unknown Track Alias\".\n *\n * This makes the window quiet, not safe. Once a publisher reassigns the alias the tombstone\n * is reclaimed, and nothing on a group stream distinguishes the old subscription's objects\n * from the new one's. Cancelling promptly is what bounds the exposure to a round trip.\n * @internal\n */\nexport class RetiredTrackAlias extends Error {\n\tconstructor(alias: bigint) {\n\t\tsuper(`track alias retired: ${alias}`);\n\t\tthis.name = \"RetiredTrackAlias\";\n\t}\n}\n\n/**\n * Thrown when a publisher gives one alias to two subscriptions of the same track.\n *\n * Draft-19 section 5.1 permits this and expects the subscriber to demux by re-applying\n * each subscription's filter. Ours are all LargestObject, so they are indistinguishable and\n * we cannot, which costs the one subscription. It is not a protocol error, so it must not\n * take the session down with it.\n * @internal\n */\nexport class SharedTrackAlias extends Error {\n\tconstructor(alias: bigint) {\n\t\tsuper(`track alias shared by another subscription: ${alias}`);\n\t\tthis.name = \"SharedTrackAlias\";\n\t}\n}\n\n/**\n * Thrown when a publisher points one alias at two different tracks at once, which\n * draft-19 section 11.1 makes fatal to the session.\n * @internal\n */\nexport class DuplicateTrackAlias extends Error {\n\tconstructor(alias: bigint) {\n\t\tsuper(`duplicate track alias: ${alias}`);\n\t\tthis.name = \"DuplicateTrackAlias\";\n\t}\n}\n\n/** Resolves publisher-chosen track aliases after control/data stream reordering. @internal */\nexport class TrackAliases<T> {\n\t#active = new Map<bigint, { value: T; track: TrackIdentity }>();\n\t#pending = new Map<bigint, Set<Resolver<T>>>();\n\n\t/** Aliases whose subscription we cancelled, in retirement order so the oldest is forgotten first. */\n\t#retired: bigint[] = [];\n\t#retiredSet = new Set<bigint>();\n\n\t/**\n\t * Waits briefly for an alias to be established by SUBSCRIBE_OK or PUBLISH.\n\t *\n\t * Throws {@link RetiredTrackAlias} at once for an alias we cancelled, rather than\n\t * waiting out the timeout for a binding that is never coming.\n\t */\n\tasync get(alias: bigint): Promise<T> {\n\t\tconst bound = this.#active.get(alias);\n\t\tif (bound !== undefined) return bound.value;\n\t\tif (this.#retiredSet.has(alias)) throw new RetiredTrackAlias(alias);\n\n\t\tconst { promise, resolve } = Promise.withResolvers<T>();\n\t\tlet resolvers = this.#pending.get(alias);\n\t\tif (!resolvers) {\n\t\t\tresolvers = new Set();\n\t\t\tthis.#pending.set(alias, resolvers);\n\t\t}\n\t\tresolvers.add(resolve);\n\n\t\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\t\tconst timeout = new Promise<never>((_, reject) => {\n\t\t\ttimer = setTimeout(() => reject(new Error(`unknown track alias: ${alias}`)), TRACK_ALIAS_TIMEOUT_MS);\n\t\t});\n\n\t\ttry {\n\t\t\treturn await Promise.race([promise, timeout]);\n\t\t} finally {\n\t\t\tclearTimeout(timer);\n\t\t\tresolvers.delete(resolve);\n\t\t\tif (this.#pending.get(alias) === resolvers && resolvers.size === 0) this.#pending.delete(alias);\n\t\t}\n\t}\n\n\t/**\n\t * Establishes an alias and releases any data streams waiting for it.\n\t *\n\t * `track` is the full track name the alias was bound to, which is what decides whether a\n\t * repeat is the legal sharing of an alias across subscriptions to one track\n\t * ({@link SharedTrackAlias}) or the collision that must fail the session\n\t * ({@link DuplicateTrackAlias}).\n\t */\n\tset(alias: bigint, value: T, track: TrackIdentity) {\n\t\tconst active = this.#active.get(alias);\n\t\tif (active !== undefined) {\n\t\t\tif (active.value === value) return;\n\t\t\tthrow sameTrack(active.track, track) ? new SharedTrackAlias(alias) : new DuplicateTrackAlias(alias);\n\t\t}\n\n\t\t// Our subscription is gone, so the publisher is free to point the alias somewhere\n\t\t// new. Reclaiming it also drops the tombstone early.\n\t\tthis.#forget(alias);\n\n\t\tthis.#active.set(alias, { value, track });\n\t\tconst resolvers = this.#pending.get(alias);\n\t\tthis.#pending.delete(alias);\n\t\tfor (const resolve of resolvers ?? []) resolve(value);\n\t}\n\n\t/**\n\t * Retires an alias whose subscription was cancelled, so groups still in flight for it\n\t * are discarded promptly instead of reported as unknown.\n\t *\n\t * Only retires an alias that still belongs to the supplied value: a later subscription\n\t * may already have reclaimed it, and that binding outranks a departing owner.\n\t *\n\t * Returns whether this caller still owned the binding, so metadata keyed by the alias is\n\t * only torn down by the owner and never out from under whoever reclaimed it.\n\t */\n\tretire(alias: bigint, value: T): boolean {\n\t\tif (this.#active.get(alias)?.value !== value) return false;\n\t\tthis.#active.delete(alias);\n\n\t\tif (this.#retiredSet.has(alias)) return true;\n\t\tthis.#retiredSet.add(alias);\n\t\tthis.#retired.push(alias);\n\n\t\twhile (this.#retired.length > RETIRED_ALIAS_CAPACITY) {\n\t\t\tconst oldest = this.#retired.shift();\n\t\t\tif (oldest !== undefined) this.#retiredSet.delete(oldest);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t#forget(alias: bigint) {\n\t\tif (!this.#retiredSet.delete(alias)) return;\n\t\tconst at = this.#retired.indexOf(alias);\n\t\tif (at !== -1) this.#retired.splice(at, 1);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MoQ Cluster extension (draft-lcurley-moq-cluster-00).
|
|
3
|
+
*
|
|
4
|
+
* moq-transport carries no routing information, so a peer cannot tell whether an
|
|
5
|
+
* advertisement already passed through us. This extension adds it:
|
|
6
|
+
*
|
|
7
|
+
* - each endpoint declares its own Hop ID via the RELAY_HOPS Setup Option, which is also
|
|
8
|
+
* what negotiates the extension;
|
|
9
|
+
* - every advertisement carries the HOP_PATH it traversed and the accumulated ROUTE_COST
|
|
10
|
+
* of that path, as Key-Value-Pair message parameters on PUBLISH_NAMESPACE and NAMESPACE.
|
|
11
|
+
*
|
|
12
|
+
* These are the semantics moq-lite carries natively on every announcement (see
|
|
13
|
+
* `lite/announce.ts`); this module is the moq-transport binding, negotiated on draft-17+
|
|
14
|
+
* only, where SETUP is a Key-Value-Pair block.
|
|
15
|
+
*
|
|
16
|
+
* We are a leaf, never a relay: the only path we can advertise is our own, so we stamp a
|
|
17
|
+
* single-entry HOP_PATH and seed the cost at 0. What we get out of declaring is the other
|
|
18
|
+
* direction. A relay that knows our Hop ID withholds the advertisements that already flowed
|
|
19
|
+
* through us, so publishing a broadcast no longer announces it back to us, which is what
|
|
20
|
+
* moq-lite has always done with its own hop chain.
|
|
21
|
+
*
|
|
22
|
+
* @module
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
import { type Origin } from "../origin";
|
|
26
|
+
import type { Reader } from "../stream";
|
|
27
|
+
import { Parameters, type SetupOptions } from "./parameters";
|
|
28
|
+
import { type IetfVersion } from "./version";
|
|
29
|
+
/**
|
|
30
|
+
* Whether a version can negotiate the extension.
|
|
31
|
+
*
|
|
32
|
+
* Draft-17 is the first with the unified SETUP: a bare Key-Value-Pair block that a new
|
|
33
|
+
* option slots into without touching the message shape. Earlier drafts exchange SETUP over
|
|
34
|
+
* the legacy control stream, which this extension does not cover.
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare function supported(version: IetfVersion): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The Hop IDs this session declared, one per direction.
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export interface Hops {
|
|
45
|
+
/** Our own Hop ID, declared in SETUP and stamped onto every advertisement we send. */
|
|
46
|
+
self: Origin;
|
|
47
|
+
/**
|
|
48
|
+
* The peer's Hop ID, or `undefined` when it declared no RELAY_HOPS.
|
|
49
|
+
*
|
|
50
|
+
* This is what decides whether advertisements carry the parameters at all, in both
|
|
51
|
+
* directions: a peer that declared nothing has not read ours either, so sending it a
|
|
52
|
+
* HOP_PATH would be a protocol violation and expecting one back would reject a legal
|
|
53
|
+
* message. A peer that declared the reserved 0 negotiated the extension but withheld its
|
|
54
|
+
* identity, so the parameters flow and there is simply nothing to exclude.
|
|
55
|
+
*/
|
|
56
|
+
peer?: Origin;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The cluster parameters carried on one advertisement.
|
|
60
|
+
*
|
|
61
|
+
* Present on every PUBLISH_NAMESPACE and NAMESPACE of a session that negotiated the
|
|
62
|
+
* extension, and on none of a session that did not.
|
|
63
|
+
*
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export interface Advert {
|
|
67
|
+
/** HOP_PATH: the path this advertisement traversed, publisher first, sender last. */
|
|
68
|
+
hops: Origin[];
|
|
69
|
+
/** ROUTE_COST: the marginal cost of subscribing via this advertisement. Absent on the
|
|
70
|
+
* wire means 0, so an endpoint that prices nothing sends nothing. */
|
|
71
|
+
cost: bigint;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Read the peer's Hop ID out of its SETUP, or `undefined` when it did not negotiate.
|
|
75
|
+
*
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
export declare function fromSetup(params: SetupOptions, version: IetfVersion): Origin | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Declare our own Hop ID, which is also what negotiates the extension.
|
|
81
|
+
*
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
export declare function intoSetup(params: SetupOptions, self: Origin, version: IetfVersion): void;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the session negotiated the extension, which is what decides whether an
|
|
87
|
+
* advertisement carries the parameters in either direction.
|
|
88
|
+
*
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
export declare function negotiated(ids: Hops | undefined): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* The advertisement to send for one of our own broadcasts, or `undefined` on a session
|
|
94
|
+
* that negotiated nothing.
|
|
95
|
+
*
|
|
96
|
+
* The sender's own Hop ID is always the last entry, so a receiver reconstructs the full
|
|
97
|
+
* path without the sender restating it. We originate everything we advertise, so the path
|
|
98
|
+
* is just us and the cost is 0: a subscription costs the peer nothing but the transfer,
|
|
99
|
+
* since we are already producing the content.
|
|
100
|
+
*
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
export declare function advertise(ids: Hops | undefined): Advert | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Whether this advertisement looped back through `self`.
|
|
106
|
+
*
|
|
107
|
+
* A receiver discards such an advertisement: forwarding it would extend the loop, and
|
|
108
|
+
* subscribing through it would route the receiver back to itself. Hop ID 0 identifies
|
|
109
|
+
* nothing, so a receiver that withheld its own identity detects nothing.
|
|
110
|
+
*
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
export declare function loops(advert: Advert, self: Origin): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Write an advertisement's parameters, ready to encode onto the wire.
|
|
116
|
+
*
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
export declare function intoParams(advert: Advert): Parameters;
|
|
120
|
+
/**
|
|
121
|
+
* Read the parameters a negotiated session puts on every advertisement.
|
|
122
|
+
*
|
|
123
|
+
* The parameter block is mandatory there, so a message that ends before it (the base form)
|
|
124
|
+
* or one whose block does not parse is the peer's violation, same as a block that parses but
|
|
125
|
+
* carries no HOP_PATH.
|
|
126
|
+
*
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
export declare function decodeParams(r: Reader, version: IetfVersion): Promise<Advert>;
|
|
130
|
+
/**
|
|
131
|
+
* Read an advertisement out of a decoded parameter block.
|
|
132
|
+
*
|
|
133
|
+
* Every way this fails is one the draft says to close the session over: a negotiated session
|
|
134
|
+
* that omits HOP_PATH, entries that do not exactly fill the parameter, an empty list, or a
|
|
135
|
+
* non-zero Hop ID appearing twice. So they all surface as one {@link ProtocolViolation},
|
|
136
|
+
* which the session dispatch acts on.
|
|
137
|
+
*
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
export declare function fromParams(params: Parameters): Advert;
|
|
141
|
+
//# sourceMappingURL=cluster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster.d.ts","sourceRoot":"","sources":["../../src/ietf/cluster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAY,KAAK,MAAM,EAAgC,MAAM,cAAc,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAe,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,KAAK,WAAW,EAAW,MAAM,cAAc,CAAC;AAEzD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAEvD;AAED;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACpB,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM;IACtB,qFAAqF;IACrF,IAAI,EAAE,MAAM,EAAE,CAAC;IAEf;yEACqE;IACrE,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAYxF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,QAGjF;AAED;;;;;GAKG;AACH,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