Skip to content

Commit 82a1b86

Browse files
authored
Editorial: Unify sesion termination (#1357)
Unification makes it much easier to search through the document. Especially when backreferencing or validating an implementation. As advised publicly by Alan, I am not filing an editorial issue; instead, I am directly filling a PR. Starting this as a single PR. Happy to split into multiple PRs or drop some changes if deemed better. I didn't want to unnecessarily pollute PRs. ### Close session vs. terminate session: I know the document has a `## Termination {#session-termination}` section. But even in it, "terminate" and "close" are both used. I do think "close" is better, because there are other uses of the word "terminate". https://github.com/moq-wg/moq-transport/blob/586da24d41327cafc22dd4d886b5e2602d166116/draft-ietf-moq-transport.md?plain=1#L1288-L1289 Looking back at this, this may also need clarification. I tried to do a minimum number of changes for unification, so I chose to use "close" for session and keep "termination" for streams and subscriptions. Sorry if this is a wrong call; English is (obviously) not my 1st language.
1 parent b1309d4 commit 82a1b86

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

draft-ietf-moq-transport.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,12 @@ Key-Value-Pair {
296296
* Length: Only present when Type is odd. Specifies the length of the Value field
297297
in bytes. The maximum length of a value is 2^16-1 bytes. If an endpoint
298298
receives a length larger than the maximum, it MUST close the session with a
299-
Protocol Violation.
299+
`PROTOCOL_VIOLATION`.
300300
* Value: A single varint encoded value when Type is even, otherwise a
301301
sequence of Length bytes.
302302

303303
If a receiver understands a Type, and the following Value or Length/Value does
304-
not match the serialization defined by that Type, the receiver MUST terminate
304+
not match the serialization defined by that Type, the receiver MUST close
305305
the session with error code `KEY_VALUE_FORMATTING_ERROR`.
306306

307307
### Reason Phrase Structure {#reason-phrase}
@@ -801,7 +801,7 @@ MOQT enables proactively draining sessions via the GOAWAY message ({{message-goa
801801
The server sends a GOAWAY message, signaling the client to establish a new
802802
session and migrate any `Established` subscriptions. The GOAWAY message optionally
803803
contains a new URI for the new session, otherwise the current URI is
804-
reused. The server SHOULD terminate the session with `GOAWAY_TIMEOUT` after a
804+
reused. The server SHOULD close the session with `GOAWAY_TIMEOUT` after a
805805
sufficient timeout if there are still open subscriptions or fetches on a
806806
connection.
807807

@@ -1775,7 +1775,7 @@ not depend upon the forwarding preference. There is no explicit signal that an
17751775
Object was not sent because the delivery timeout was exceeded.
17761776

17771777
DELIVERY_TIMEOUT, if present, MUST contain a value greater than 0. If an
1778-
endpoint receives a DELIVERY_TIMEOUT equal to 0 it MUST terminate the session
1778+
endpoint receives a DELIVERY_TIMEOUT equal to 0 it MUST close the session
17791779
with `PROTOCOL_VIOLATION`.
17801780

17811781
If both the subscriber and publisher specify the parameter, they use the min of
@@ -1921,10 +1921,11 @@ message, the default value is 1.
19211921
#### DYNAMIC GROUPS Parameter {#dynamic-groups}
19221922

19231923
The DYNAMIC_GROUPS parameter (parameter type 0x30) MAY appear in PUBLISH or
1924-
SUBSCRIBE_OK. Values larger than 1 are a Protocol Violation. When the value is
1925-
1, it indicates that the subscriber can request the Original Publisher to start
1926-
a new Group by including the NEW_GROUP_REQUEST parameter in PUBLISH_OK or
1927-
SUBSCRIBE_UPDATE for this Track.
1924+
SUBSCRIBE_OK. The allowed values are 0 or 1. When the value is 1, it indicates
1925+
that the subscriber can request the Original Publisher to start a new Group
1926+
by including the NEW_GROUP_REQUEST parameter in PUBLISH_OK or SUBSCRIBE_UPDATE
1927+
for this Track. If an endpoint receives a value larger than 1, it MUST close
1928+
the session with `PROTOCOL_VIOLATION`.
19281929

19291930
Relays MUST preserve the value of this parameter received from an upstream
19301931
publisher in SUBSCRIBE_OK or PUBLISH when sending these messages to downstream
@@ -2090,7 +2091,7 @@ Upon receiving a GOAWAY, an endpoint SHOULD NOT initiate new requests to the
20902091
peer including SUBSCRIBE, PUBLISH, FETCH, PUBLISH_NAMESPACE,
20912092
SUBSCRIBE_NAMESPACE and TRACK_SATUS.
20922093

2093-
The endpoint MUST terminate the session with a `PROTOCOL_VIOLATION`
2094+
The endpoint MUST close the session with a `PROTOCOL_VIOLATION`
20942095
({{session-termination}}) if it receives multiple GOAWAY messages.
20952096

20962097
~~~
@@ -2112,16 +2113,16 @@ GOAWAY Message {
21122113
maximum, it MUST close the session with a `PROTOCOL_VIOLATION`.
21132114

21142115
If a server receives a GOAWAY with a non-zero New Session URI Length it MUST
2115-
terminate the session with a `PROTOCOL_VIOLATION`.
2116+
close the session with a `PROTOCOL_VIOLATION`.
21162117

21172118
## MAX_REQUEST_ID {#message-max-request-id}
21182119

21192120
An endpoint sends a MAX_REQUEST_ID message to increase the number of requests
21202121
the peer can send within a session.
21212122

2122-
The Maximum Request ID MUST only increase within a session, and
2123-
receipt of a MAX_REQUEST_ID message with an equal or smaller Request ID
2124-
value is a `PROTOCOL_VIOLATION`.
2123+
The Maximum Request ID MUST only increase within a session. If an endpoint
2124+
receives MAX_REQUEST_ID message with an equal or smaller Request ID it MUST
2125+
close the session with a `PROTOCOL_VIOLATION`.
21252126

21262127
~~~
21272128
MAX_REQUEST_ID Message {
@@ -2357,7 +2358,7 @@ When updating the Subscription Filter (see {{subscription-filters}}),
23572358
the Start Location MUST not decrease, as an attempt to
23582359
to do so could fail. If Objects with Locations smaller than the current
23592360
subscription's Largest Location are required, FETCH can be used to retrieve
2360-
them. A publisher MUST terminate the session with a `PROTOCOL_VIOLATION` if the
2361+
them. A publisher MUST close the session with a `PROTOCOL_VIOLATION` if the
23612362
SUBSCRIBE_UPDATE violates this rule.
23622363

23632364
When a subscriber narrows their subscription (increase the Start Location and/or
@@ -3136,7 +3137,7 @@ are beyond the end of a group or track.
31363137
{{malformed-tracks}}). This SHOULD be cached.
31373138

31383139
Any other value SHOULD be treated as a protocol error and the session SHOULD
3139-
be terminated with a `PROTOCOL_VIOLATION` ({{session-termination}}).
3140+
be closed with a `PROTOCOL_VIOLATION` ({{session-termination}}).
31403141
Any object with a status code other than zero MUST have an empty payload.
31413142

31423143
#### Object Extension Header {#object-extensions}
@@ -3284,7 +3285,7 @@ There are 10 defined Type values for OBJECT_DATAGRAM.
32843285
When Objects are sent on streams, the stream begins with a Subgroup or Fetch
32853286
Header and is followed by one or more sets of serialized Object fields.
32863287
If a stream ends gracefully (i.e., the stream terminates with a FIN) in the
3287-
middle of a serialized Object, the session SHOULD be terminated with a
3288+
middle of a serialized Object, the session SHOULD be closed with a
32883289
`PROTOCOL_VIOLATION`.
32893290

32903291
A publisher SHOULD NOT open more than one stream at a time with the same Subgroup

0 commit comments

Comments
 (0)