You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Protocol.md
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -895,6 +895,10 @@ PAYLOAD frames and all REQUEST frames may represent a large object and MAY need
895
895
896
896
Fragmentation does not change the request(n) or lease counts. In other words, a fragmented PAYLOAD frame counts as a single request(n) credit, and a request counts against a single lease count, regardless of how many fragments the frame is split into.
897
897
898
+
#### PAYLOAD Frame
899
+
900
+
When a PAYLOAD frame needs to be fragmented, a sequence of PAYLOAD frames is delivered using the (F)ollows flag.
901
+
898
902
When a PAYLOAD is fragmented, the Metadata MUST be transmitted completely before the Data.
899
903
900
904
For example, a single PAYLOAD with 20MB of Metdata and 25MB of Data that is fragmented into 3 frames:
@@ -927,6 +931,46 @@ Frame length = 13MB
927
931
13MB of Data
928
932
```
929
933
934
+
If the sender (Requester or Responder) wants to cancel sending a fragmented sequence, it MAY send a CANCEL frame without finishing delivery of the fragments.
935
+
936
+
#### REQUEST Frames
937
+
938
+
When REQUEST_RESPONSE, REQUEST_FNF, REQUEST_STREAM, or REQUEST_CHANNEL frames need to be fragmented, the first frame is the REQUEST_* frame with the (F)ollows flag set, followed by a sequence of PAYLOAD frames.
939
+
940
+
When fragmented, the Metadata MUST be transmitted completely before the Data.
941
+
942
+
For example, a single PAYLOAD with 20MB of Metdata and 25MB of Data that is fragmented into 3 frames:
943
+
944
+
```
945
+
-- REQUEST_RESPONSE frame 1
946
+
Frame length = 16MB
947
+
(M)etadata present = 1
948
+
(F)ollows = 1 (fragments coming)
949
+
Metadata Length = 16MB
950
+
951
+
16MB of METADATA
952
+
0MB of Data
953
+
954
+
-- PAYLOAD frame 2
955
+
Frame length = 16MB
956
+
(M)etadata present = 1
957
+
(F)ollows = 1 (fragments coming)
958
+
Metadata Length = 4MB
959
+
960
+
4MB of METADATA
961
+
12MB of Data
962
+
963
+
-- PAYLOAD frame 3
964
+
Frame length = 13MB
965
+
(M)etadata present = 0
966
+
(F)ollows = 0
967
+
968
+
0MB of METADATA
969
+
13MB of Data
970
+
```
971
+
972
+
If the Requester wants to cancel sending a fragmented sequence, it MAY send a CANCEL frame without finishing delivery of the fragments.
973
+
930
974
## Stream Sequences and Lifetimes
931
975
932
976
Streams exists for a specific period of time. So an implementation may assume that Stream IDs are valid for a finite period of time. This period of time is bound by either a) the lifetime of the underlying transport protocol connection, or b) the lifetime of a session if resumability is used to extend the session across multiple transport protocol connections. Beyond that, each interaction pattern imposes lifetime based on a sequence of interactions between Requester and Responder.
0 commit comments