@@ -178,6 +178,8 @@ There's a 1-byte STREAM_TYPE at the beginning of each stream.
178178| ------- | ------------- | ---------- |
179179| 0x4 | Probe | Subscriber |
180180| ------- | ------------- | ----------- |
181+ | 0x5 | Goaway | Either |
182+ | ------- | ------------- | ----------- |
181183
182184# ## Announce
183185A subscriber can open a Announce Stream to discover broadcasts matching a prefix.
@@ -227,6 +229,16 @@ The publisher periodically replies with PROBE messages on the same bidirectional
227229
228230If the publisher does not support PROBE (e.g., congestion controller is not exposed), it MUST reset the stream.
229231
232+ # ## Goaway
233+ Either endpoint can open a Goaway Stream (0x5) to initiate a graceful session shutdown.
234+
235+ The sender sends a GOAWAY message containing an optional new session URI.
236+ If the URI is non-empty, the peer SHOULD establish a new session at the provided URI and migrate any active subscriptions.
237+ The peer MUST NOT open new streams on the current session after receiving a GOAWAY.
238+
239+ The sender closes the stream (FIN) when it is ready to terminate the session.
240+ The peer SHOULD close all streams and the session after migrating or when it no longer needs the session.
241+
230242# Delivery
231243The most important concept in moq-lite is how to deliver a subscription.
232244QUIC can only improve the user experience if data is delivered out-of-order during congestion.
@@ -570,6 +582,20 @@ PROBE Message {
570582When sent by the subscriber (stream opener) : the target bitrate in bits per second that the publisher should pad up to.
571583When sent by the publisher (responder) : the current measured bitrate in bits per second.
572584
585+ # # GOAWAY
586+ A GOAWAY message is sent to initiate a graceful session shutdown with an optional redirect.
587+
588+ ~~~
589+ GOAWAY Message {
590+ Message Length (i)
591+ New Session URI (s)
592+ }
593+ ~~~
594+
595+ **New Session URI**:
596+ A URI for the peer to reconnect to.
597+ An empty string indicates no redirect; the peer should simply close the session.
598+
573599# # GROUP
574600The GROUP message contains information about a Group, as well as a reference to the subscription being served.
575601
@@ -608,6 +634,9 @@ A generic library or relay MUST NOT inspect or modify the contents unless otherw
608634
609635# Appendix A: Changelog
610636
637+ # # moq-lite-04
638+ - Added GOAWAY stream for graceful session shutdown and migration.
639+
611640# # moq-lite-03
612641- Version negotiated via ALPN (`moq-lite-xx`) instead of SETUP messages.
613642- Removed Session, SessionCompat streams and SESSION_CLIENT/SESSION_SERVER/SESSION_UPDATE messages.
@@ -648,7 +677,6 @@ A quick comparison of moq-lite and moq-transport-14:
648677- No paused subscriptions (forward=0)
649678
650679# # Deleted Messages
651- - GOAWAY
652680- MAX_SUBSCRIBE_ID
653681- REQUESTS_BLOCKED
654682- SUBSCRIBE_ERROR
0 commit comments