Skip to content

Commit db669f3

Browse files
kixelatedclaude
andcommitted
Rename GROUP_DROP to SUBSCRIBE_DROP, add type discriminator
Add a type field before message length to distinguish SUBSCRIBE_OK (0x0) and SUBSCRIBE_DROP (0x1) on the subscribe response stream. SUBSCRIBE_OK must be the first message; SUBSCRIBE_DROP before it is invalid. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f1f91c0 commit db669f3

1 file changed

Lines changed: 20 additions & 12 deletions

File tree

draft-lcurley-moq-lite.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@ There is currently no P2P support within QUIC so it's out of scope for moq-lite.
7777

7878
The moq-lite version is negotiated via ALPN during the QUIC handshake.
7979
The ALPN format is `moq-lite-xx` where `xx` is the two-digit draft version.
80-
The latest ALPN is `moq-lite-03`.
8180

8281
The session is active immediately after the QUIC/WebTransport connection is established.
83-
No additional handshake is required.
8482
Extensions are negotiated via stream probing: an endpoint opens a stream with an unknown type and the peer resets it if unsupported.
8583

8684
While moq-lite is a point-to-point protocol, it's intended to work end-to-end via relays.
@@ -123,7 +121,7 @@ A Group is served by a dedicated QUIC stream which is closed on completion, rese
123121
This ensures that all Frames within a Group arrive reliably and in order.
124122

125123
In contrast, Groups may arrive out of order due to network congestion and prioritization.
126-
The application MUST process or buffer groups out of order to avoid blocking on flow control.
124+
The application SHOULD process or buffer groups out of order to avoid blocking on flow control.
127125

128126
## Frame
129127
A Frame is a payload of bytes within a Group.
@@ -159,7 +157,7 @@ However, it is ultimately the other peer's responsibility to close their send di
159157

160158
## Handshake
161159
The moq-lite version is negotiated via ALPN during the QUIC handshake.
162-
The ALPN format is `moq-lite-xx` where `xx` is the two-digit draft version (latest: `moq-lite-03`).
160+
The ALPN format is `moq-lite-xx` where `xx` is the two-digit draft version.
163161
The session is active immediately after the connection is established.
164162

165163
# Streams
@@ -203,9 +201,10 @@ There MAY be multiple Announce Streams, potentially containing overlapping prefi
203201
A subscriber opens Subscribe Streams to request a Track.
204202

205203
The subscriber MUST start a Subscribe Stream with a SUBSCRIBE message followed by any number of SUBSCRIBE_UPDATE messages.
206-
The publisher replies with a SUBSCRIBE_OK message followed by any number of GROUP_DROP and additional SUBSCRIBE_OK messages.
204+
The publisher replies with a SUBSCRIBE_OK message followed by any number of SUBSCRIBE_DROP and additional SUBSCRIBE_OK messages.
205+
The first message on the response stream MUST be a SUBSCRIBE_OK; it is not valid to send a SUBSCRIBE_DROP before SUBSCRIBE_OK.
207206

208-
The publisher closes the stream (FIN) when every group from start to end has been accounted for, either via a completed GROUP stream or a GROUP_DROP message.
207+
The publisher closes the stream (FIN) when every group from start to end has been accounted for, either via a completed GROUP stream or a SUBSCRIBE_DROP message.
209208
Unbounded subscriptions (no end group) stay open until the track ends or either endpoint cancels.
210209
Either endpoint MAY reset/cancel the stream at any time.
211210

@@ -472,9 +471,11 @@ See [SUBSCRIBE](#subscribe) for information about each field.
472471
## SUBSCRIBE_OK
473472
A SUBSCRIBE_OK message is sent in response to a SUBSCRIBE.
474473
The publisher MAY send multiple SUBSCRIBE_OK messages to update the subscription.
474+
The first message on the response stream MUST be a SUBSCRIBE_OK; a SUBSCRIBE_DROP MUST NOT precede it.
475475

476476
~~~
477477
SUBSCRIBE_OK Message {
478+
Type (i) = 0x0
478479
Message Length (i)
479480
Publisher Priority (8)
480481
Publisher Ordered (1)
@@ -484,6 +485,9 @@ SUBSCRIBE_OK Message {
484485
}
485486
~~~
486487

488+
**Type**:
489+
Set to 0x0 to indicate a SUBSCRIBE_OK message.
490+
487491
**Group Sequence**:
488492
The resolved absolute start group sequence.
489493

@@ -493,18 +497,22 @@ A value of 0 means unbounded.
493497

494498
See [SUBSCRIBE](#subscribe) for information about the other fields.
495499

496-
## GROUP_DROP
497-
A GROUP_DROP message is sent by the publisher on the Subscribe Stream when groups cannot be served.
500+
## SUBSCRIBE_DROP
501+
A SUBSCRIBE_DROP message is sent by the publisher on the Subscribe Stream when groups cannot be served.
498502

499503
~~~
500-
GROUP_DROP Message {
504+
SUBSCRIBE_DROP Message {
505+
Type (i) = 0x1
501506
Message Length (i)
502507
Group Sequence (i)
503508
Group Count (i)
504509
Error Code (i)
505510
}
506511
~~~
507512

513+
**Type**:
514+
Set to 0x1 to indicate a SUBSCRIBE_DROP message.
515+
508516
**Group Sequence**:
509517
The first group sequence in the dropped range.
510518

@@ -598,12 +606,12 @@ A generic library or relay MUST NOT inspect or modify the contents unless otherw
598606
# Appendix A: Changelog
599607

600608
## moq-lite-03
601-
- Version negotiated via ALPN (`moq-lite-xx`, latest `moq-lite-03`) instead of SETUP messages.
609+
- Version negotiated via ALPN (`moq-lite-xx`) instead of SETUP messages.
602610
- Removed Session, SessionCompat streams and SESSION_CLIENT/SESSION_SERVER/SESSION_UPDATE messages.
603611
- Unknown stream types reset instead of fatal; enables extension negotiation via stream probing.
604612
- Added FETCH stream for single group download.
605-
- Added Start Group and End Group (+1 encoded) to SUBSCRIBE, SUBSCRIBE_UPDATE, and SUBSCRIBE_OK.
606-
- Added GROUP_DROP on Subscribe stream.
613+
- Added Start Group and End Group to SUBSCRIBE, SUBSCRIBE_UPDATE, and SUBSCRIBE_OK.
614+
- Added SUBSCRIBE_DROP on Subscribe stream.
607615
- Subscribe stream closed (FIN) when all groups accounted for.
608616
- Added PROBE stream replacing SESSION_UPDATE bitrate.
609617
- Removed ANNOUNCE_INIT message.

0 commit comments

Comments
 (0)