@moq/net 0.3.4 → 0.4.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.
Files changed (215) hide show
  1. package/README.md +2 -2
  2. package/announce.d.ts +7 -0
  3. package/announce.d.ts.map +1 -0
  4. package/announce.js +8 -0
  5. package/announce.js.map +1 -0
  6. package/announced.d.ts +35 -91
  7. package/announced.d.ts.map +1 -1
  8. package/announced.js +21 -156
  9. package/announced.js.map +1 -1
  10. package/bandwidth.d.ts +163 -0
  11. package/bandwidth.d.ts.map +1 -0
  12. package/bandwidth.js +304 -0
  13. package/bandwidth.js.map +1 -0
  14. package/bandwidth_api.d.ts +7 -0
  15. package/bandwidth_api.d.ts.map +1 -0
  16. package/bandwidth_api.js +8 -0
  17. package/bandwidth_api.js.map +1 -0
  18. package/broadcast.d.ts +20 -28
  19. package/broadcast.d.ts.map +1 -1
  20. package/broadcast.js +60 -42
  21. package/broadcast.js.map +1 -1
  22. package/connection/accept.d.ts +16 -1
  23. package/connection/accept.d.ts.map +1 -1
  24. package/connection/accept.js +39 -24
  25. package/connection/accept.js.map +1 -1
  26. package/connection/browser.d.ts.map +1 -1
  27. package/connection/browser.js +9 -7
  28. package/connection/browser.js.map +1 -1
  29. package/connection/connect.d.ts +30 -6
  30. package/connection/connect.d.ts.map +1 -1
  31. package/connection/connect.js +97 -50
  32. package/connection/connect.js.map +1 -1
  33. package/connection/established.d.ts +16 -21
  34. package/connection/established.d.ts.map +1 -1
  35. package/connection/established.js.map +1 -1
  36. package/connection/forward.d.ts +2 -0
  37. package/connection/forward.d.ts.map +1 -0
  38. package/connection/forward.js +159 -0
  39. package/connection/forward.js.map +1 -0
  40. package/connection/handshake.d.ts.map +1 -1
  41. package/connection/handshake.js +2 -2
  42. package/connection/handshake.js.map +1 -1
  43. package/connection/index.d.ts +5 -5
  44. package/connection/index.d.ts.map +1 -1
  45. package/connection/index.js +4 -5
  46. package/connection/index.js.map +1 -1
  47. package/connection/pool.d.ts +188 -0
  48. package/connection/pool.d.ts.map +1 -0
  49. package/connection/pool.js +351 -0
  50. package/connection/pool.js.map +1 -0
  51. package/connection/reload.d.ts +14 -93
  52. package/connection/reload.d.ts.map +1 -1
  53. package/connection/reload.js +216 -80
  54. package/connection/reload.js.map +1 -1
  55. package/connection/stats.d.ts +3 -26
  56. package/connection/stats.d.ts.map +1 -1
  57. package/connection/stats.js.map +1 -1
  58. package/connection/transport.d.ts +0 -7
  59. package/connection/transport.d.ts.map +1 -1
  60. package/consume.d.ts +1 -43
  61. package/consume.d.ts.map +1 -1
  62. package/consume.js +1 -1
  63. package/consume.js.map +1 -1
  64. package/error.d.ts +180 -29
  65. package/error.d.ts.map +1 -1
  66. package/error.js +310 -16
  67. package/error.js.map +1 -1
  68. package/errors.d.ts +7 -0
  69. package/errors.d.ts.map +1 -0
  70. package/errors.js +8 -0
  71. package/errors.js.map +1 -0
  72. package/group.d.ts +9 -43
  73. package/group.d.ts.map +1 -1
  74. package/group.js +283 -69
  75. package/group.js.map +1 -1
  76. package/hop.d.ts +107 -0
  77. package/hop.d.ts.map +1 -0
  78. package/hop.js +103 -0
  79. package/hop.js.map +1 -0
  80. package/ietf/aliases.d.ts +1 -78
  81. package/ietf/aliases.d.ts.map +1 -1
  82. package/ietf/cluster.d.ts +6 -120
  83. package/ietf/cluster.d.ts.map +1 -1
  84. package/ietf/cluster.js +81 -41
  85. package/ietf/cluster.js.map +1 -1
  86. package/ietf/connection.d.ts +6 -72
  87. package/ietf/connection.d.ts.map +1 -1
  88. package/ietf/connection.js +11 -47
  89. package/ietf/connection.js.map +1 -1
  90. package/ietf/error.d.ts +11 -0
  91. package/ietf/error.d.ts.map +1 -0
  92. package/ietf/error.js +168 -0
  93. package/ietf/error.js.map +1 -0
  94. package/ietf/filter.d.ts.map +1 -1
  95. package/ietf/filter.js +6 -1
  96. package/ietf/filter.js.map +1 -1
  97. package/ietf/goaway.d.ts.map +1 -1
  98. package/ietf/goaway.js +22 -5
  99. package/ietf/goaway.js.map +1 -1
  100. package/ietf/parameters.d.ts +2 -2
  101. package/ietf/parameters.d.ts.map +1 -1
  102. package/ietf/parameters.js +15 -17
  103. package/ietf/parameters.js.map +1 -1
  104. package/ietf/publish_namespace.d.ts +25 -0
  105. package/ietf/publish_namespace.d.ts.map +1 -1
  106. package/ietf/publish_namespace.js +63 -0
  107. package/ietf/publish_namespace.js.map +1 -1
  108. package/ietf/publisher.d.ts +1 -82
  109. package/ietf/publisher.d.ts.map +1 -1
  110. package/ietf/publisher.js +219 -125
  111. package/ietf/publisher.js.map +1 -1
  112. package/ietf/solicit.d.ts +1 -40
  113. package/ietf/solicit.d.ts.map +1 -1
  114. package/ietf/subscribe.d.ts +1 -5
  115. package/ietf/subscribe.d.ts.map +1 -1
  116. package/ietf/subscribe.js +8 -9
  117. package/ietf/subscribe.js.map +1 -1
  118. package/ietf/subscriber.d.ts +1 -65
  119. package/ietf/subscriber.d.ts.map +1 -1
  120. package/ietf/subscriber.js +154 -73
  121. package/ietf/subscriber.js.map +1 -1
  122. package/ietf/version.d.ts +12 -1
  123. package/ietf/version.d.ts.map +1 -1
  124. package/ietf/version.js +13 -0
  125. package/ietf/version.js.map +1 -1
  126. package/index.d.ts +11 -6
  127. package/index.d.ts.map +1 -1
  128. package/index.js +10 -5
  129. package/index.js.map +1 -1
  130. package/internal.d.ts +99 -1
  131. package/internal.d.ts.map +1 -1
  132. package/internal.js +65 -0
  133. package/internal.js.map +1 -1
  134. package/lite/announce.d.ts +15 -9
  135. package/lite/announce.d.ts.map +1 -1
  136. package/lite/announce.js +47 -20
  137. package/lite/announce.js.map +1 -1
  138. package/lite/connection.d.ts +9 -59
  139. package/lite/connection.d.ts.map +1 -1
  140. package/lite/connection.js +20 -32
  141. package/lite/connection.js.map +1 -1
  142. package/lite/fetch.d.ts +15 -1
  143. package/lite/fetch.d.ts.map +1 -1
  144. package/lite/fetch.js +39 -7
  145. package/lite/fetch.js.map +1 -1
  146. package/lite/goaway.d.ts.map +1 -1
  147. package/lite/goaway.js +7 -1
  148. package/lite/goaway.js.map +1 -1
  149. package/lite/group.d.ts +18 -4
  150. package/lite/group.d.ts.map +1 -1
  151. package/lite/group.js +31 -10
  152. package/lite/group.js.map +1 -1
  153. package/lite/priority.d.ts +1 -61
  154. package/lite/priority.d.ts.map +1 -1
  155. package/lite/priority.js +4 -5
  156. package/lite/priority.js.map +1 -1
  157. package/lite/publisher.d.ts +1 -69
  158. package/lite/publisher.d.ts.map +1 -1
  159. package/lite/publisher.js +559 -232
  160. package/lite/publisher.js.map +1 -1
  161. package/lite/setup.d.ts +7 -7
  162. package/lite/setup.d.ts.map +1 -1
  163. package/lite/setup.js +13 -13
  164. package/lite/setup.js.map +1 -1
  165. package/lite/subscribe.d.ts +61 -13
  166. package/lite/subscribe.d.ts.map +1 -1
  167. package/lite/subscribe.js +186 -44
  168. package/lite/subscribe.js.map +1 -1
  169. package/lite/subscriber.d.ts +8 -57
  170. package/lite/subscriber.d.ts.map +1 -1
  171. package/lite/subscriber.js +179 -117
  172. package/lite/subscriber.js.map +1 -1
  173. package/lite/track.d.ts +4 -10
  174. package/lite/track.d.ts.map +1 -1
  175. package/lite/track.js +34 -29
  176. package/lite/track.js.map +1 -1
  177. package/lite/version.d.ts +31 -6
  178. package/lite/version.d.ts.map +1 -1
  179. package/lite/version.js +71 -11
  180. package/lite/version.js.map +1 -1
  181. package/origin.d.ts +229 -29
  182. package/origin.d.ts.map +1 -1
  183. package/origin.js +1087 -37
  184. package/origin.js.map +1 -1
  185. package/package.json +3 -2
  186. package/path.d.ts +25 -7
  187. package/path.d.ts.map +1 -1
  188. package/path.js +5 -3
  189. package/path.js.map +1 -1
  190. package/stream.d.ts.map +1 -1
  191. package/stream.js +25 -16
  192. package/stream.js.map +1 -1
  193. package/time.d.ts +15 -2
  194. package/time.d.ts.map +1 -1
  195. package/time.js +28 -9
  196. package/time.js.map +1 -1
  197. package/track.d.ts +171 -82
  198. package/track.d.ts.map +1 -1
  199. package/track.js +633 -184
  200. package/track.js.map +1 -1
  201. package/util/log.d.ts +5 -0
  202. package/util/log.d.ts.map +1 -0
  203. package/util/log.js +17 -0
  204. package/util/log.js.map +1 -0
  205. package/wire.d.ts +67 -0
  206. package/wire.d.ts.map +1 -0
  207. package/wire.js +32 -0
  208. package/wire.js.map +1 -0
  209. package/zod.d.ts +1 -1
  210. package/zod.d.ts.map +1 -1
  211. package/zod.js.map +1 -1
  212. package/mock.d.ts +0 -66
  213. package/mock.d.ts.map +0 -1
  214. package/mock.js +0 -243
  215. package/mock.js.map +0 -1
package/track.d.ts CHANGED
@@ -6,10 +6,10 @@
6
6
  import { type GetPromise, type Getter } from "@moq/signals";
7
7
  import type { Datagram } from "./datagram";
8
8
  import { type Frame, type Consumer as GroupConsumer, Producer as GroupProducer } from "./group";
9
- import { Timescale, type Timestamp } from "./time";
9
+ import { Milli, Timescale, type Timestamp } from "./time";
10
10
  export type { Datagram } from "./datagram";
11
- /** Default {@link Info.latencyMax} window (milliseconds) when the publisher does not set one. */
12
- export declare const DEFAULT_LATENCY_MAX_MS = 5000;
11
+ /** Default {@link Info.maxAge} window (milliseconds) when the publisher does not set one. */
12
+ export declare const DEFAULT_MAX_AGE_MS: Milli;
13
13
  /** A position within a track: a group's sequence and a frame's index inside it. */
14
14
  export interface Location {
15
15
  /** The group's sequence number within the track. */
@@ -32,39 +32,59 @@ export interface Info {
32
32
  */
33
33
  timescale: Timescale;
34
34
  /**
35
- * Publisher Max Latency: the maximum age (milliseconds) of a non-latest group before
35
+ * Publisher Max Age: the maximum age (milliseconds) of a non-latest group before
36
36
  * the publisher evicts it. Reported in TRACK_INFO (Lite05+) so relays re-serve with the
37
37
  * same bound. The publisher-side half of the budget a subscriber sets for itself.
38
+ * Rounded up to a whole millisecond by {@link infoDefaults}, which refuses a negative
39
+ * or non-finite value and a result past `Number.MAX_SAFE_INTEGER`.
38
40
  */
39
- latencyMax: number;
40
- /** Tie-break priority between subscriptions of equal subscriber priority. */
41
+ maxAge: Milli;
42
+ /** Tie-break priority between subscriptions of equal subscriber priority (`0..=255`). */
41
43
  priority: number;
42
- /**
43
- * Whether groups are prioritized in sequence order. Groups may always arrive
44
- * out-of-order (or not at all) over the network. Defaults to `false` (newest-first).
45
- */
46
- ordered: boolean;
47
44
  }
48
45
  /** Fill in any unset {@link Info} fields with their defaults. */
49
46
  export declare function infoDefaults(info?: Partial<Info>): Info;
47
+ /** An explicitly included or excluded group sequence. */
48
+ export type Bound = {
49
+ included: number;
50
+ excluded?: never;
51
+ } | {
52
+ excluded: number;
53
+ included?: never;
54
+ };
55
+ /** Group limits; an omitted endpoint is unbounded. */
56
+ export interface Groups {
57
+ /** The first group boundary. */
58
+ start?: Bound;
59
+ /** The last group boundary. */
60
+ end?: Bound;
61
+ }
50
62
  /**
51
63
  * Per-subscription options, requested when a subscription opens and adjustable later via
52
64
  * {@link Subscriber.update}. Mirrors the Rust `Subscription`.
53
65
  */
54
66
  export interface Subscription {
55
- /** Delivery priority relative to this session's other subscriptions. Defaults to `0`. */
67
+ /** Delivery priority relative to this session's other subscriptions (`0..=255`). Defaults to `0`. */
56
68
  priority?: number;
57
- /** Whether groups are prioritized in sequence order. Defaults to `false` (newest-first). */
58
- ordered?: boolean;
59
- /** Maximum age (milliseconds) of a non-latest group before it is skipped. Defaults to `0`. */
60
- latencyMax?: number;
61
- /** First group the publisher should deliver, or omit to start at the latest group. */
62
- startGroup?: number;
63
- /** Last group the publisher should deliver (inclusive), or omit for no end. */
64
- endGroup?: number;
69
+ /**
70
+ * Maximum age (milliseconds) of a non-latest group before it is skipped. Defaults to `0`.
71
+ * Rounded up to a whole millisecond, so a value derived from a measurement is never
72
+ * shortened. A negative or non-finite value, or one past `Number.MAX_SAFE_INTEGER`
73
+ * after rounding, is refused.
74
+ */
75
+ maxAge?: Milli;
76
+ /**
77
+ * The lowest group the publisher may deliver (a floor), or omit for none.
78
+ *
79
+ * A floor, not a request: only {@link maxAge} asks for data, and the floor bounds how
80
+ * far back it may reach. Omitting it and a floor of 0 mean the same thing, and a floor
81
+ * above the live edge simply waits there (a resumed subscription naming where it left
82
+ * off).
83
+ */
84
+ groups?: Groups;
65
85
  }
66
86
  /**
67
- * A request for a track the peer wants, yielded by `Broadcast.Producer.requested`.
87
+ * A request for a track the peer wants, delivered to the publishing wire layer.
68
88
  *
69
89
  * Created internally by the broadcast when a subscription (or info lookup) needs a track
70
90
  * served; answer it with {@link accept} or {@link reject}.
@@ -90,21 +110,6 @@ export interface FetchGroupOptions {
90
110
  /** Delivery priority for the fetch stream. Defaults to `0`. */
91
111
  priority?: number;
92
112
  }
93
- /**
94
- * The per-track operations a lazy {@link Consumer} delegates to the broadcast it came from.
95
- *
96
- * Implemented by `broadcast.Producer` / `broadcast.Consumer` (and the wire-layer subclasses
97
- * that resolve them over the network), so a track handle holds a reference to its broadcast
98
- * and calls methods on it rather than capturing a bag of callbacks.
99
- */
100
- export interface Broadcast {
101
- /** Open a live subscription to the named track. */
102
- subscribe(name: string, options?: Subscription): Subscriber;
103
- /** Resolve the named track's immutable info. */
104
- resolveTrackInfo(name: string): Promise<Info>;
105
- /** Fetch a single group of the named track by sequence. */
106
- fetchGroup(name: string, sequence: number, options?: FetchGroupOptions): Promise<GroupConsumer>;
107
- }
108
113
  /**
109
114
  * A lazy handle to a track on a consumed broadcast.
110
115
  *
@@ -114,8 +119,15 @@ export declare class Consumer {
114
119
  #private;
115
120
  /** The track name. */
116
121
  readonly name: string;
117
- constructor(name: string, broadcast: Broadcast);
118
- /** Open a live subscription to the track. */
122
+ private constructor();
123
+ /**
124
+ * Open a live subscription to the track.
125
+ *
126
+ * The cursor starts at the group the subscription named (its floor), or 0.
127
+ * {@link Subscription.maxAge} is what asks for data: delivery skips everything above
128
+ * the floor that the budget convicts, so the default budget of zero delivers only the
129
+ * latest group and a larger one reaches back over what it can still use.
130
+ */
119
131
  subscribe(options?: Subscription): Subscriber;
120
132
  /** Fetch the track's immutable publisher properties without subscribing. */
121
133
  info(): Promise<Info>;
@@ -129,7 +141,7 @@ export declare class Consumer {
129
141
  * subscription the publisher serves from it) gets an independent
130
142
  * {@link Subscriber} that receives a full copy of the groups, each with its own
131
143
  * read cursor. Groups are mirrored into every live subscriber and retained for the
132
- * track's `latencyMax` window so a late subscriber replays the recent groups.
144
+ * track's `maxAge` window so a late subscriber replays the recent groups.
133
145
  *
134
146
  * Obtained from {@link Request.accept} (the wire asks the application for a track to
135
147
  * serve) or constructed directly for an in-process track.
@@ -144,6 +156,13 @@ export declare class Producer {
144
156
  * Rejects if the track is closed before the properties are known.
145
157
  */
146
158
  info(): Promise<Info>;
159
+ /**
160
+ * Publisher priority from the committed {@link Info}, or 0 before {@link accept}.
161
+ *
162
+ * Higher is served first. Hang publishers set this from `Catalog.PRIORITY` so
163
+ * audio outranks video on the wire and in the bandwidth allocator.
164
+ */
165
+ get priority(): number;
147
166
  /**
148
167
  * Settles once the track closes: `null` on a clean close, or the abort {@link Error}.
149
168
  * Peek it synchronously (`undefined` while open), observe it reactively, or `await` it.
@@ -156,7 +175,14 @@ export declare class Producer {
156
175
  get subscription(): Getter<Subscription | undefined>;
157
176
  /** Commit the immutable publisher properties, resolving {@link info}. Returns `this`. */
158
177
  accept(info?: Partial<Info>): this;
159
- /** An independent {@link Subscriber} receiving a full copy of this track's groups. */
178
+ /**
179
+ * An independent {@link Subscriber} reading this track's groups.
180
+ *
181
+ * Its cursor starts at the group the subscription named (its floor), or 0.
182
+ * {@link Subscription.maxAge} is what asks for data: delivery skips everything above
183
+ * the floor that the budget convicts, so the default budget of zero delivers only the
184
+ * latest group and a larger one reaches back over what it can still use.
185
+ */
160
186
  subscribe(options?: Subscription): Subscriber;
161
187
  /**
162
188
  * Whether the track currently has any subscribers.
@@ -189,17 +215,17 @@ export declare class Producer {
189
215
  * keep datagram payloads small (e.g. a single audio frame). Datagrams are never delivered
190
216
  * over IETF moq-transport or stream-only transports (the WebSocket fallback). A payload over
191
217
  * 65535 bytes (the QUIC datagram frame ceiling) throws. An origin publisher uses this; a
192
- * relay preserving upstream numbering uses {@link writeDatagram}.
218
+ * relay preserving upstream numbering uses {@link insertDatagram}.
193
219
  */
194
220
  appendDatagram(timestamp: Timestamp, payload: Uint8Array): number;
195
221
  /**
196
- * Write a datagram with an explicit sequence number.
222
+ * Insert a datagram with an explicit sequence number.
197
223
  *
198
224
  * Preserves the supplied sequence (advancing the shared counter if needed) so a relay can
199
225
  * forward a datagram without renumbering it. The size limits of {@link appendDatagram}
200
226
  * apply. Most origin publishers want {@link appendDatagram} instead.
201
227
  */
202
- writeDatagram(datagram: Datagram): void;
228
+ insertDatagram(sequence: number, timestamp: Timestamp, payload: Uint8Array): void;
203
229
  /** Close the track and every subscriber, mirroring the abort to their groups. Idempotent. */
204
230
  close(abort?: Error): void;
205
231
  /** Append a frame as its own single-frame group. */
@@ -237,6 +263,13 @@ export declare class Subscriber {
237
263
  get subscription(): Getter<Subscription | undefined>;
238
264
  /** Return the latest group sequence observed on this track, if any. */
239
265
  latest(): number | undefined;
266
+ /**
267
+ * The track's exclusive final boundary, known once the producer closes cleanly:
268
+ * one past the highest sequence produced, or 0 for a track that produced none.
269
+ * Groups and datagrams share the sequence namespace, so this can exceed
270
+ * `latest() + 1`. Undefined while the track is live or after an abort.
271
+ */
272
+ final(): number | undefined;
240
273
  /**
241
274
  * The newest frame this track has produced, or `undefined` while it has none.
242
275
  *
@@ -246,39 +279,33 @@ export declare class Subscriber {
246
279
  * left can no longer say where the edge is.
247
280
  */
248
281
  largest(): Location | undefined;
282
+ /** Limit subsequent reads to these groups and return this reader for chaining. */
283
+ withGroups(groups: Groups): this;
249
284
  /**
250
- * An independent subscriber to the same track, with its own cursor and its own replay of
251
- * the retained window.
252
- *
253
- * Reads here do not consume anything this one would deliver, which is what lets a
254
- * publisher read the cache alongside the cursor it is serving from. Resolving the track
255
- * again through the broadcast would not do: a dynamic serve is one request per peer
256
- * subscription, so that mints a second producer the application has to answer separately.
257
- *
258
- * @internal Wire layers only.
259
- */
260
- fork(options?: Subscription): Subscriber;
261
- /** Start this subscriber's local read cursor at `sequence`, without changing its wire request. */
262
- startAt(sequence: number): void;
263
- /**
264
- * Cap {@link nextGroup} and {@link recvGroup} at `sequence` inclusively, or omit it to
265
- * remove the cap. Groups above the cap remain buffered and become readable if the cap
266
- * is raised. This local cursor does not change the subscription's wire request.
285
+ * Limit subsequent reads without rewinding read progress or changing the wire request.
286
+ * An omitted start preserves the current floor; an omitted end removes the cap.
287
+ * Raising the end makes unread buffered groups available again.
267
288
  */
268
- endAt(sequence?: number): void;
289
+ setGroups(groups: Groups): void;
269
290
  /** Close the track (optionally with an error), closing any pending groups. Idempotent. */
270
291
  close(abort?: Error): void;
271
292
  /**
272
293
  * Receive every group on this track exactly once, as it becomes available.
273
294
  *
274
295
  * Groups may arrive out of order or with gaps due to network conditions; unlike
275
- * {@link nextGroup}, one that arrives after a newer group was already returned is
276
- * still delivered. When several groups are buffered, the lowest sequence is
296
+ * {@link Ordered.nextGroup}, one that arrives after a newer group was already returned
297
+ * is still delivered. When several groups are buffered, the lowest sequence is
277
298
  * returned first.
278
299
  *
279
- * Honors the floor set by {@link startAt} and the cap set by {@link endAt}: a group
300
+ * Honors the range set by {@link setGroups}: a group
280
301
  * beyond the cap stays buffered (not dropped) and is offered once the cap rises, even
281
302
  * after a clean close, without blocking in-range groups that arrive behind it.
303
+ * A group whose presentation time is further behind the live edge than this
304
+ * subscriber's `maxAge` is skipped. The default of zero takes the live edge.
305
+ * The budget remains attached after return, so a pending frame read rejects if a stalled
306
+ * group becomes stale while newer data advances.
307
+ *
308
+ * The first call commits this track to arrival order: {@link ordered} throws afterwards.
282
309
  */
283
310
  recvGroup(): Promise<GroupConsumer | undefined>;
284
311
  /**
@@ -287,7 +314,7 @@ export declare class Subscriber {
287
314
  *
288
315
  * Returns `undefined` when nothing is deliverable right now, which is not by itself the
289
316
  * end of the track: a group may still arrive, or one may be parked beyond the
290
- * {@link endAt} cap. Use it to drain what the retained window already holds, where
317
+ * {@link setGroups} cap. Use it to drain what the retained window already holds, where
291
318
  * waiting for a sequence nothing will republish would park forever.
292
319
  */
293
320
  tryRecvGroup(): GroupConsumer | undefined;
@@ -297,40 +324,102 @@ export declare class Subscriber {
297
324
  * Datagrams are a separate best-effort channel from groups (see
298
325
  * {@link Producer.appendDatagram}); they share only the sequence namespace. A consumer
299
326
  * that falls too far behind silently loses the oldest datagrams. Read this alongside
300
- * {@link recvGroup} (e.g. in a separate loop) to receive both channels concurrently. Returning
301
- * a datagram advances {@link nextGroup} past that sequence.
327
+ * {@link recvGroup} (e.g. in a separate loop) to receive both channels concurrently.
328
+ * The two cursors are independent: a datagram never moves the group cursor.
302
329
  */
303
330
  recvDatagram(): Promise<Datagram | undefined>;
304
331
  /**
305
- * Return the next group with a strictly-greater sequence number than the last returned.
332
+ * Read this track's groups in sequence order instead of arrival order.
333
+ *
334
+ * Both cursors draw from the same buffer, so a track is read one way or the other: this
335
+ * hands the subscription to the returned {@link Ordered} and leaves this handle inert.
336
+ * {@link recvGroup} and {@link recvDatagram} throw afterwards. Throws once a
337
+ * {@link recvGroup} call has already committed the track to arrival order.
306
338
  *
307
- * Late arrivals (sequence at or below the last returned) are silently skipped.
308
- * Use {@link recvGroup} to see every group in arrival order instead.
339
+ * Datagrams come along: they are a separate cursor either way, so the choice of group
340
+ * order says nothing about them, and reading them commits nothing.
309
341
  */
310
- nextGroup(): Promise<GroupConsumer | undefined>;
342
+ ordered(): Ordered;
311
343
  /**
312
- * Reads the next frame across all groups, discarding older groups.
313
- * Treat the returned frame bytes as read-only; they are shared with other consumers.
344
+ * Update this subscription's options (e.g. priority), triggering a SUBSCRIBE_UPDATE to the
345
+ * publisher. Mirrors the Rust `Subscriber::update`.
346
+ */
347
+ update(options: Subscription): void;
348
+ }
349
+ /**
350
+ * A {@link Subscriber} that reads groups in sequence order.
351
+ *
352
+ * Created by {@link Subscriber.ordered}, which takes the subscription over: the two
353
+ * cursors draw from one buffer, so a track is read one way or the other and never both.
354
+ * Every group this returns has a higher sequence than the last, so a late arrival is
355
+ * skipped rather than delivered out of turn.
356
+ *
357
+ * `maxAge` applies as this cursor reads, exactly as it does on the arrival cursor: a
358
+ * group is skipped once its reach, where its immediate successor begins, is that far
359
+ * behind the newest frame on the track. Nothing weaker convicts it, since the reach is
360
+ * the only proof that every frame it could still hold is past the budget, so a backlog
361
+ * inside the budget is still delivered whole, as a burst in order. The budget follows a
362
+ * group already handed out too: a stalled group's pending frame read rejects once newer
363
+ * content has pulled that far ahead.
364
+ */
365
+ export declare class Ordered {
366
+ #private;
367
+ /** The track name. */
368
+ readonly name: string;
369
+ private constructor();
370
+ /** Resolve this track's immutable publisher properties; see {@link Subscriber.info}. */
371
+ info(): Promise<Info>;
372
+ /** Settles once the track closes; see {@link Producer.closed}. */
373
+ get closed(): GetPromise<Error | null>;
374
+ /** This subscriber's current options, including defaults and the last {@link update}. */
375
+ get subscription(): Getter<Subscription | undefined>;
376
+ /** The latest group sequence observed on this track, if any. */
377
+ latest(): number | undefined;
378
+ /** The track's exclusive final boundary; see {@link Subscriber.final}. */
379
+ final(): number | undefined;
380
+ /** Limit subsequent reads to these groups and return this reader for chaining. */
381
+ withGroups(groups: Groups): this;
382
+ /** Limit subsequent reads to these groups; see {@link Subscriber.setGroups}. */
383
+ setGroups(groups: Groups): void;
384
+ /** Update this subscription's options; see {@link Subscriber.update}. */
385
+ update(options: Subscription): void;
386
+ /** Close the track (optionally with an error), closing any pending groups. Idempotent. */
387
+ close(abort?: Error): void;
388
+ /**
389
+ * Return the next group with a strictly-greater sequence number than the last returned.
390
+ *
391
+ * Late arrivals (sequence at or below the last returned) are silently skipped, as is a
392
+ * group whose every frame is further behind the live edge than `maxAge` (the default of
393
+ * zero keeps only what nothing newer has superseded). Honors the bounds set by
394
+ * {@link setGroups}.
314
395
  */
315
- readFrame(): Promise<Frame | undefined>;
396
+ nextGroup(): Promise<GroupConsumer | undefined>;
316
397
  /**
317
- * Reads the next frame along with its group and frame sequence numbers.
398
+ * Read the next frame across groups, in sequence order, with its group and frame numbers.
399
+ *
400
+ * Rides the same cursor as {@link nextGroup} and shares this handle's contract: a
401
+ * buffered backlog is drained in full up to the point `maxAge` proves it useless.
318
402
  * Treat the returned frame bytes as read-only; they are shared with other consumers.
319
403
  */
320
- readFrameSequence(): Promise<({
404
+ readFrame(): Promise<({
321
405
  group: number;
322
406
  frame: number;
323
407
  } & Frame) | undefined>;
324
- /** Reads the next frame and decodes it as a UTF-8 string. */
408
+ /** Read the next frame and decode it as a UTF-8 string. */
325
409
  readString(): Promise<string | undefined>;
326
- /** Reads the next frame and parses it as JSON. */
410
+ /** Read the next frame and parse it as JSON. */
327
411
  readJson(): Promise<unknown | undefined>;
328
- /** Reads the next frame and decodes it as a one-byte boolean, throwing on a malformed frame. */
412
+ /** Read the next frame and decode it as a one-byte boolean, throwing on a malformed frame. */
329
413
  readBool(): Promise<boolean | undefined>;
330
414
  /**
331
- * Update this subscription's options (e.g. priority), triggering a SUBSCRIBE_UPDATE to the
332
- * publisher. Mirrors the Rust `Subscriber::update`.
415
+ * Receive the next datagram in arrival order.
416
+ *
417
+ * Datagrams are a separate best-effort channel from groups (see
418
+ * {@link Producer.appendDatagram}); they share only the sequence namespace, and
419
+ * neither cursor moves the other. Unordered by construction, so this behaves
420
+ * identically on either handle; it is here so a track carrying both channels needs
421
+ * one subscription rather than two.
333
422
  */
334
- update(options: Subscription): void;
423
+ recvDatagram(): Promise<Datagram | undefined>;
335
424
  }
336
425
  //# sourceMappingURL=track.d.ts.map
package/track.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../src/track.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAgB,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,QAAQ,IAAI,aAAa,EAAE,QAAQ,IAAI,aAAa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