Skip to content

Commit 06d9acf

Browse files
authored
Merge SUBSCRIBE_RESET and SUBSCRIBE_FIN (#401)
Into SUBSCRIBE_DONE. I didn't remove the SUBSCRIBE_ERROR message in favor of SUBSCRIBE_CLOSED as @kixelated suggested in this PR. Fixes #398 Fixes #356 Addresses some comments in #310, but possibly not all
2 parents d8e0951 + 0c53359 commit 06d9acf

File tree

1 file changed

+36
-44
lines changed

1 file changed

+36
-44
lines changed

draft-ietf-moq-transport.md

Lines changed: 36 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,8 @@ subscribers for each track. Each new OBJECT belonging to the
629629
track within the subscription range is forwarded to each active
630630
subscriber, dependent on the congestion response. A subscription
631631
remains active until it expires, until the publisher of the track
632-
terminates the track with a SUBSCRIBE_FIN
633-
(see {{message-subscribe-fin}}) or a SUBSCRIBE_RESET
634-
(see {{message-subscribe-reset}}).
632+
terminates the track with a SUBSCRIBE_DONE
633+
(see {{message-subscribe-done}}).
635634

636635
Objects MUST NOT be sent for unsuccessful subscriptions, and if a subscriber
637636
receives a SUBSCRIBE_ERROR after receiving objects, it MUST close the session
@@ -659,6 +658,25 @@ as defined below:
659658
| 0x2 | Retry Track Alias |
660659
|------|---------------------------|
661660

661+
The applicaiton SHOULD use a relevant status code in
662+
SUBSCRIBE_DONE, as defined below:
663+
664+
|------|---------------------------|
665+
| Code | Reason |
666+
|-----:|:--------------------------|
667+
| 0x0 | Unsubscribed |
668+
|------|---------------------------|
669+
| 0x1 | Internal Error |
670+
|------|---------------------------|
671+
| 0x2 | Unauthorized |
672+
|------|---------------------------|
673+
| 0x3 | Track Ended |
674+
|------|---------------------------|
675+
| 0x4 | Subscription Ended |
676+
|------|---------------------------|
677+
| 0x5 | Going Away |
678+
|------|---------------------------|
679+
662680

663681
## Publisher Interactions
664682

@@ -763,9 +781,7 @@ MOQT Message {
763781
|-------|-----------------------------------------------------|
764782
| 0xA | UNSUBSCRIBE ({{message-unsubscribe}}) |
765783
|-------|-----------------------------------------------------|
766-
| 0xB | SUBSCRIBE_FIN ({{message-subscribe-fin}}) |
767-
|-------|-----------------------------------------------------|
768-
| 0xC | SUBSCRIBE_RESET ({{message-subscribe-reset}}) |
784+
| 0xB | SUBSCRIBE_DONE ({{message-subscribe-done}}) |
769785
|-------|-----------------------------------------------------|
770786
| 0x10 | GOAWAY ({{message-goaway}}) |
771787
|-------|-----------------------------------------------------|
@@ -1390,7 +1406,10 @@ SUBSCRIBE_ERROR
13901406
## UNSUBSCRIBE {#message-unsubscribe}
13911407

13921408
A subscriber issues a `UNSUBSCRIBE` message to a publisher indicating it is no
1393-
longer interested in receiving media for the specified track.
1409+
longer interested in receiving media for the specified track and Objects
1410+
should stop being sent as soon as possible. The publisher sends a
1411+
SUBSCRIBE_DONE to acknowledge the unsubscribe was successful and indicate
1412+
the final Object.
13941413

13951414
The format of `UNSUBSCRIBE` is as follows:
13961415

@@ -1403,56 +1422,29 @@ UNSUBSCRIBE Message {
14031422

14041423
* Subscribe ID: Subscription Identifer as defined in {{message-subscribe-req}}.
14051424

1406-
## SUBSCRIBE_FIN {#message-subscribe-fin}
1425+
## SUBSCRIBE_DONE {#message-subscribe-done}
14071426

1408-
A publisher issues a `SUBSCRIBE_FIN` message to all subscribers indicating it
1409-
is done publishing objects on the subscribed track.
1427+
A publisher issues a `SUBSCRIBE_DONE` message to indicate it
1428+
is done publishing Objects for that subscription. The Status Code indicates why
1429+
the subscription ended, and whether it was an error.
14101430

1411-
The format of `SUBSCRIBE_FIN` is as follows:
1431+
The format of `SUBSCRIBE_DONE` is as follows:
14121432

14131433
~~~
1414-
SUBSCRIBE_FIN Message {
1434+
SUBSCRIBE_DONE Message {
14151435
Subscribe ID (i),
1416-
ContentExists (1),
1417-
[Final Group (i)],
1418-
[Final Object (i)],
1419-
}
1420-
~~~
1421-
{: #moq-transport-subscribe-fin-format title="MOQT SUBSCRIBE_FIN Message"}
1422-
1423-
* Subscribe ID: Subscription identifier as defined in {{message-subscribe-req}}.
1424-
1425-
* ContentExists: 1 if an object has been published for this subscription, 0 if
1426-
not. If 0, then the Final Group and Final Object fields will not be present.
1427-
1428-
* Final Group: The largest Group ID sent by the publisher in an OBJECT
1429-
message in this track.
1430-
1431-
* Final Object: The largest Object ID sent by the publisher in an OBJECT
1432-
message in the `Final Group` for this track.
1433-
1434-
## SUBSCRIBE_RESET {#message-subscribe-reset}
1435-
1436-
A publisher issues a `SUBSCRIBE_RESET` message to all subscribers indicating there
1437-
was an error publishing to the given track and subscription is terminated.
1438-
1439-
The format of `SUBSCRIBE_RESET` is as follows:
1440-
1441-
~~~
1442-
SUBSCRIBE_RESET Message {
1443-
Subscribe ID (i),
1444-
Error Code (i),
1436+
Status Code (i),
14451437
Reason Phrase (b),
14461438
ContentExists (1),
14471439
[Final Group (i)],
14481440
[Final Object (i)],
14491441
}
14501442
~~~
1451-
{: #moq-transport-subscribe-reset format title="MOQT SUBSCRIBE RESET Message"}
1443+
{: #moq-transport-subscribe-fin-format title="MOQT SUBSCRIBE_DONE Message"}
14521444

1453-
* Subscribe ID: Subscription Identifier as defined in {{message-subscribe-req}}.
1445+
* Subscribe ID: Subscription identifier as defined in {{message-subscribe-req}}.
14541446

1455-
* Error Code: Identifies an integer error code for subscription failure.
1447+
* Status Code: An integer status code indicating why the subscription ended.
14561448

14571449
* Reason Phrase: Provides the reason for subscription error.
14581450

0 commit comments

Comments
 (0)