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
Rename RESPONSE to PAYLOAD since it flows both directions, not just in response to a request.
Preparative change for making requestChannel send messages with PAYLOAD, not multiple REQUEST_CHANNEL frames.
|__RESUME__| 0x0D |__Resume__: Replaces SETUP for Resuming Operation (optional) |
@@ -649,7 +649,7 @@ A client assumes a SETUP is rejected if it receives a SETUP_ERROR.
649
649
650
650
Until connection establishment is complete, a Requester MUST NOT send any Request frames.
651
651
652
-
Until connection establishment is complete, a Responder MUST NOT emit any RESPONSE frames.
652
+
Until connection establishment is complete, a Responder MUST NOT emit any PAYLOAD frames.
653
653
654
654
### Negotiation
655
655
@@ -695,7 +695,7 @@ The possible sequences with LEASE are below.
695
695
696
696
## Fragmentation And Reassembly
697
697
698
-
RESPONSE frames and all REQUEST frames may represent a large object and MAY need to be fragmented to fit within the Frame Data size. When this
698
+
PAYLOAD frames and all REQUEST frames may represent a large object and MAY need to be fragmented to fit within the Frame Data size. When this
699
699
occurs, the __F__ flag indicates if more fragments follow the current frame (or not).
700
700
701
701
## Stream Sequences and Lifetimes
@@ -715,7 +715,7 @@ time, but it is recommended that an implementation not aggressively re-use IDs.
715
715
### Request Response
716
716
717
717
1. RQ -> RS: REQUEST_RESPONSE
718
-
1. RS -> RQ: RESPONSE with COMPLETE
718
+
1. RS -> RQ: PAYLOAD with COMPLETE
719
719
720
720
or
721
721
@@ -748,19 +748,19 @@ REQUEST_FNF are assumed to be best effort and MAY not be processed due to: (1) S
748
748
### Request Stream
749
749
750
750
1. RQ -> RS: REQUEST_STREAM
751
-
1. RS -> RQ: RESPONSE*
751
+
1. RS -> RQ: PAYLOAD*
752
752
1. RS -> RQ: ERROR
753
753
754
754
or
755
755
756
756
1. RQ -> RS: REQUEST_STREAM
757
-
1. RS -> RQ: RESPONSE*
758
-
1. RS -> RQ: RESPONSE with COMPLETE
757
+
1. RS -> RQ: PAYLOAD*
758
+
1. RS -> RQ: COMPLETE
759
759
760
760
or
761
761
762
762
1. RQ -> RS: REQUEST_STREAM
763
-
1. RS -> RQ: RESPONSE*
763
+
1. RS -> RQ: PAYLOAD*
764
764
1. RQ -> RS: CANCEL
765
765
766
766
At any time, a client may send REQUEST_N frames.
@@ -776,13 +776,13 @@ Upon sending a COMPLETE or ERROR, the stream is terminated on the Responder.
776
776
### Request Channel
777
777
778
778
1. RQ -> RS: REQUEST_CHANNEL* intermixed with
779
-
1. RS -> RQ: RESPONSE*
779
+
1. RS -> RQ: PAYLOAD*
780
780
1. RS -> RQ: COMPLETE | ERROR
781
781
782
782
or
783
783
784
784
1. RQ -> RS: REQUEST_CHANNEL* intermixed with
785
-
1. RS -> RQ: RESPONSE*
785
+
1. RS -> RQ: PAYLOAD*
786
786
1. RQ -> RS: CANCEL
787
787
788
788
At any time, a Requester may send REQUEST_CHANNEL frames with F bit set to indicate fragmentation.
@@ -815,7 +815,7 @@ Upon sending a COMPLETE or ERROR, the stream is terminated on the Responder.
815
815
#### Responder
816
816
817
817
1. CLOSED: implicit starting/ending state of all stream IDs
818
-
1. Responding: sending RESPONSEs and processing REQUEST_N
818
+
1. Responding: sending PAYLOADs and processing REQUEST_N
819
819
1. CLOSED (received CANCEL)
820
820
1. CLOSED (sent COMPLETE or received REQUEST_FNF)
821
821
1. CLOSED (sent ERROR)
@@ -833,13 +833,13 @@ The Requester and the Responder MUST respect the reactive-streams semantics.
833
833
e.g. here's an example of a successful stream call with flow-control.
834
834
835
835
1. RQ -> RS: REQUEST_STREAM (REQUEST_N=3)
836
-
1. RS -> RQ: RESPONSE
837
-
1. RS -> RQ: RESPONSE
838
-
1. RS -> RQ: RESPONSE
836
+
1. RS -> RQ: PAYLOAD
837
+
1. RS -> RQ: PAYLOAD
838
+
1. RS -> RQ: PAYLOAD
839
839
1. RS needs to wait for a new REQUEST_N at that point
840
840
1. RQ -> RS: REQUEST_N (n=3)
841
-
1. RS -> RQ: RESPONSE
842
-
1. RS -> RQ: RESPONSE with COMPLETE
841
+
1. RS -> RQ: PAYLOAD
842
+
1. RS -> RQ: PAYLOAD with COMPLETE
843
843
844
844
#### Lease Semantics
845
845
@@ -869,16 +869,16 @@ under [Keepalive Frame](#keepalive-frame). The decision to close a connection du
869
869
1. Request keepalive and timeout semantics are the responsibility of the application.
870
870
1. Lack of REQUEST_N frames that stops a stream is an application concern and SHALL NOT be handled by the protocol.
871
871
1. Lack of LEASE frames that stops new Requests is an application concern and SHALL NOT be handled by the protocol.
872
-
1. If a RESPONSE for a REQUEST_RESPONSE is received that does not have a COMPLETE flag set, the implementation MUST
872
+
1. If a PAYLOAD for a REQUEST_RESPONSE is received that does not have a COMPLETE flag set, the implementation MUST
873
873
assume it is set and act accordingly.
874
-
1. Reassembly of RESPONSEs and REQUEST_CHANNELs MUST assume the possibility of an infinite stream.
874
+
1. Reassembly of PAYLOADs and REQUEST_CHANNELs MUST assume the possibility of an infinite stream.
875
875
1. Stream ID values MAY be re-used after completion or error of a stream.
876
-
1. A RESPONSE with both __F__ and __C__ flags set, implicitly ignores the __F__ flag.
876
+
1. A PAYLOAD with both __F__ and __C__ flags set, implicitly ignores the __F__ flag.
877
877
1. All other received frames that are not accounted for in previous sections MUST be ignored. Thus, for example:
878
878
1. Receiving a Request frame on a Stream ID that is already in use MUST be ignored.
879
879
1. Receiving a CANCEL on an unknown Stream ID (including 0) MUST be ignored.
880
880
1. Receiving an ERROR on an unknown Stream ID MUST be ignored.
881
-
1. Receiving a RESPONSE on an unknown Stream ID (including 0) MUST be ignored.
881
+
1. Receiving a PAYLOAD on an unknown Stream ID (including 0) MUST be ignored.
882
882
1. Receiving a METADATA_PUSH with a non-0 Stream ID MUST be ignored.
883
883
1. A server MUST ignore a SETUP frame after it has accepted a previous SETUP.
884
884
1. A server MUST ignore a SETUP_ERROR frame.
@@ -905,13 +905,13 @@ ReactiveSocket resumption exists only for specific cases. It is not intended to
905
905
906
906
Resuming operation requires knowing the position of data reception of the previous connection. For this to be simplified, the underlying transport is assumed to support contiguous delivery of data on a per frame basis. In other words, partial frames are not delivered for processing nor are gaps allowed in the stream of frames sent by either the client or server. The current list of supported transports (TCP, WebSocket, and Aeron) all satisfy this requirement or can be made to do so in the case of TCP.
907
907
908
-
As a Requester or Responder __sends__ REQUEST, CANCEL, or RESPONSE frames, it maintains a __position__ of that frame within the connection in that direction. This is a 64-bit value that starts at 0. As a Requester or Responder __receives__ REQUEST, CANCEL, or RESPONSE frames, it maintains an __implied position__ of that frame within the connection in that direction. This is also a 64-bit value that starts at 0.
908
+
As a Requester or Responder __sends__ REQUEST, CANCEL, or PAYLOAD frames, it maintains a __position__ of that frame within the connection in that direction. This is a 64-bit value that starts at 0. As a Requester or Responder __receives__ REQUEST, CANCEL, or PAYLOAD frames, it maintains an __implied position__ of that frame within the connection in that direction. This is also a 64-bit value that starts at 0.
909
909
910
910
The reason this is “implied” is that the position is not included in each frame and is inferred simply by the message being sent/received on the connection in relation to previous frames.
911
911
912
912
This position will be used to identify the location for resuming operation to begin.
913
913
914
-
Frame types outside REQUEST, CANCEL, ERROR, and RESPONSE do not have assigned (nor implied) positions.
914
+
Frame types outside REQUEST, CANCEL, ERROR, and PAYLOAD do not have assigned (nor implied) positions.
915
915
916
916
### Client Lifetime Management
917
917
@@ -927,8 +927,8 @@ Client side resumption operation starts when the client desires to try to resume
927
927
* Client waits for either a RESUME_OK or ERROR frame from the server.
928
928
* On receiving an ERROR frame, the client MUST NOT attempt resumption again if the error code was REJECTED_RESUME.
929
929
* On receiving a RESUME_OK, the client:
930
-
* MUST assume that the next REQUEST, CANCEL, ERROR, and RESPONSE frames have an implied position commencing from the last implied positions
931
-
* MAY retransmit *all* REQUEST, CANCEL, ERROR, and RESPONSE frames starting at the RESUME_OK Last Received Position field value from the server.
930
+
* MUST assume that the next REQUEST, CANCEL, ERROR, and PAYLOAD frames have an implied position commencing from the last implied positions
931
+
* MAY retransmit *all* REQUEST, CANCEL, ERROR, and PAYLOAD frames starting at the RESUME_OK Last Received Position field value from the server.
932
932
* MAY send an ERROR frame indicating the end of the connection and MUST NOT attempt resumption again
933
933
934
934
Server side resumption operation starts when the client sends a RESUME frame. The operation then proceeds as the following:
@@ -937,8 +937,8 @@ Server side resumption operation starts when the client sends a RESUME frame. Th
937
937
* MUST send an ERROR frame if the server does not support resuming operation. This is accomplished by handling the Ignore bit in the RESUME frame.
938
938
* use the RESUME Identification Token field to determine which client the resume pertains to. If the client is identified successfully, resumption MAY be continued. If not identified, then the server MUST send an ERROR frame.
939
939
* if successfully identified, then the server MAY send a RESUME_OK and then:
940
-
* MUST assume that the next REQUEST, CANCEL, ERROR, and RESPONSE frames have an implied position commencing from the last implied positions
941
-
* MAY retransmit *all* REQUEST, CANCEL, ERROR, and RESPONSE frames starting at the RESUME Last Received Position field value from the client.
940
+
* MUST assume that the next REQUEST, CANCEL, ERROR, and PAYLOAD frames have an implied position commencing from the last implied positions
941
+
* MAY retransmit *all* REQUEST, CANCEL, ERROR, and PAYLOAD frames starting at the RESUME Last Received Position field value from the client.
942
942
* if successfully identified, then the server MAY send an ERROR frame if the server can not resume operation given the value of RESUME Last Received Position if the position is not one it deems valid to resume operation from or other extenuating circumstances.
943
943
944
944
A Server that receives a RESUME frame after a SETUP frame, SHOULD send an ERROR.
0 commit comments