Skip to content

Commit

Permalink
Merge SUBSCRIBE_RESET and SUBSCRIBE_FIN (#401)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ianswett authored Mar 4, 2024
2 parents d8e0951 + 0c53359 commit 06d9acf
Showing 1 changed file with 36 additions and 44 deletions.
80 changes: 36 additions & 44 deletions draft-ietf-moq-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,8 @@ subscribers for each track. Each new OBJECT belonging to the
track within the subscription range is forwarded to each active
subscriber, dependent on the congestion response. A subscription
remains active until it expires, until the publisher of the track
terminates the track with a SUBSCRIBE_FIN
(see {{message-subscribe-fin}}) or a SUBSCRIBE_RESET
(see {{message-subscribe-reset}}).
terminates the track with a SUBSCRIBE_DONE
(see {{message-subscribe-done}}).

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

The applicaiton SHOULD use a relevant status code in
SUBSCRIBE_DONE, as defined below:

|------|---------------------------|
| Code | Reason |
|-----:|:--------------------------|
| 0x0 | Unsubscribed |
|------|---------------------------|
| 0x1 | Internal Error |
|------|---------------------------|
| 0x2 | Unauthorized |
|------|---------------------------|
| 0x3 | Track Ended |
|------|---------------------------|
| 0x4 | Subscription Ended |
|------|---------------------------|
| 0x5 | Going Away |
|------|---------------------------|


## Publisher Interactions

Expand Down Expand Up @@ -763,9 +781,7 @@ MOQT Message {
|-------|-----------------------------------------------------|
| 0xA | UNSUBSCRIBE ({{message-unsubscribe}}) |
|-------|-----------------------------------------------------|
| 0xB | SUBSCRIBE_FIN ({{message-subscribe-fin}}) |
|-------|-----------------------------------------------------|
| 0xC | SUBSCRIBE_RESET ({{message-subscribe-reset}}) |
| 0xB | SUBSCRIBE_DONE ({{message-subscribe-done}}) |
|-------|-----------------------------------------------------|
| 0x10 | GOAWAY ({{message-goaway}}) |
|-------|-----------------------------------------------------|
Expand Down Expand Up @@ -1390,7 +1406,10 @@ SUBSCRIBE_ERROR
## UNSUBSCRIBE {#message-unsubscribe}

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

The format of `UNSUBSCRIBE` is as follows:

Expand All @@ -1403,56 +1422,29 @@ UNSUBSCRIBE Message {

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

## SUBSCRIBE_FIN {#message-subscribe-fin}
## SUBSCRIBE_DONE {#message-subscribe-done}

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

The format of `SUBSCRIBE_FIN` is as follows:
The format of `SUBSCRIBE_DONE` is as follows:

~~~
SUBSCRIBE_FIN Message {
SUBSCRIBE_DONE Message {
Subscribe ID (i),
ContentExists (1),
[Final Group (i)],
[Final Object (i)],
}
~~~
{: #moq-transport-subscribe-fin-format title="MOQT SUBSCRIBE_FIN Message"}

* Subscribe ID: Subscription identifier as defined in {{message-subscribe-req}}.

* ContentExists: 1 if an object has been published for this subscription, 0 if
not. If 0, then the Final Group and Final Object fields will not be present.

* Final Group: The largest Group ID sent by the publisher in an OBJECT
message in this track.

* Final Object: The largest Object ID sent by the publisher in an OBJECT
message in the `Final Group` for this track.

## SUBSCRIBE_RESET {#message-subscribe-reset}

A publisher issues a `SUBSCRIBE_RESET` message to all subscribers indicating there
was an error publishing to the given track and subscription is terminated.

The format of `SUBSCRIBE_RESET` is as follows:

~~~
SUBSCRIBE_RESET Message {
Subscribe ID (i),
Error Code (i),
Status Code (i),
Reason Phrase (b),
ContentExists (1),
[Final Group (i)],
[Final Object (i)],
}
~~~
{: #moq-transport-subscribe-reset format title="MOQT SUBSCRIBE RESET Message"}
{: #moq-transport-subscribe-fin-format title="MOQT SUBSCRIBE_DONE Message"}

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

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

* Reason Phrase: Provides the reason for subscription error.

Expand Down

0 comments on commit 06d9acf

Please sign in to comment.