Skip to content

Commit 451fd42

Browse files
committed
cleanup
1 parent a33239d commit 451fd42

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

Protocol.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Key words used by this document conform to the meanings in [RFC 2119](https://to
77

88
## Terminology
99

10-
* __Frame__: A frame of data containing a request or a response.
10+
* __Frame__: A frame of data containing a request, response, or protocol processing.
1111
* __Fragment__: A portion of an application message that has been partitioned for inclusion in a Frame.
1212
See [Fragmentation and Reassembly](#fragmentation-and-reassembly).
1313
* __Transport__: Protocol used to carry ReactiveSockets protocol. One of WebSockets, TCP, or Aeron. The transport MUST
@@ -65,8 +65,8 @@ reception. Flags generally depend on Frame Type, but all frame types must provid
6565

6666
#### Handling Ignore Flag
6767

68-
The __I__gnore flag is used for extension of the protocol. A value of 0 in a frame for this flag indicates the protocol can't
69-
ignore this frame. An implementation MAY close the connection on reception of a frame that it does not understand with this
68+
The (__I__)gnore flag is used for extension of the protocol. A value of 0 in a frame for this flag indicates the protocol can't
69+
ignore this frame. An implementation MAY close the underlying transport connection on reception of a frame that it does not understand with this
7070
bit not set.
7171

7272
#### Metadata Optional Header
@@ -110,7 +110,7 @@ to odd/even values. In other words, a client MUST generate even Stream IDs and a
110110
| Type | Value | Description |
111111
|:-------------------------------|:-------|:------------|
112112
| __RESERVED__ | 0x0000 | __Reserved__ |
113-
| __SETUP__ | 0x0001 | __Setup__: Capabilities Of Side Sending The Frame. |
113+
| __SETUP__ | 0x0001 | __Setup__: Capabilities Of Client Sending The Frame. |
114114
| __LEASE__ | 0x0002 | __Lease__: |
115115
| __KEEPALIVE__ | 0x0003 | __Keepalive__: Connection keepalive. |
116116
| __REQUEST_RESPONSE__ | 0x0004 | __Request Response__: |
@@ -162,7 +162,7 @@ Frame Contents
162162
* (__S__)trict: Adhere to strict interpretation of Data and Metadata.
163163
* __Version__: Version of the protocol.
164164
* __Time Between KEEPALIVE Frames__: Time (in nanoseconds) between KEEPALIVE frames that the client will send.
165-
* __Max Lifetime __: Time (in nanoseconds) that a client will allow a server to not respond to a KEEPALIVE before
165+
* __Max Lifetime__: Time (in nanoseconds) that a client will allow a server to not respond to a KEEPALIVE before
166166
it is assumed to be dead.
167167
* __MIME Length__: Encoding MIME Type Length in bytes.
168168
* __Encoding MIME Type__: MIME Type for encoding of Data and Metadata. This is a US-ASCII string
@@ -217,7 +217,7 @@ means the error pertains to a given stream.
217217
| __REJECTED_SETUP__ | 0x0003 | The server rejected the setup, it can specify the reason in the payload. Stream ID MUST be 0. |
218218
| __CONNECTION_ERROR__ | 0x0011 | The connection is being terminated. Stream ID MUST be 0. |
219219
| __APPLICATION_ERROR__ | 0x0021 | Application layer logic generating a Reactive Streams _onError_ event. Stream ID MUST be non-0. |
220-
| __LEASE_ERROR__ | 0x0022 | LEASE semantics indicate that the request can not be handled at this time. |
220+
| __LEASE_ERROR__ | 0x0022 | LEASE semantics indicate that the request can not be handled at this time. Stream ID MUST be non-0. |
221221
| __RESERVED__ | 0xFFFF | __Reserved for Extension Use__ |
222222

223223
__NOTE__: Values in the range of 0x0001 to 0x000F are reserved for use as SETUP_ERROR codes. Values in the range of
@@ -620,16 +620,23 @@ The possible sequences with LEASE are below.
620620

621621
## Fragmentation And Reassembly
622622

623-
RESPONSE frames may represent a large object and MAY need to be fragmented to fit within the Frame Data size. When this
624-
occurs, the RESPONSE __F__ flag indicates if more fragments follow this frame.
623+
RESPONSE frames and REQUEST_CHANNEL frames may represent a large object and MAY need to be fragmented to fit within the Frame Data size. When this
624+
occurs, the RESPONSE __F__ flag indicates if more fragments follow the current frame (or not).
625625

626626
## Stream Sequences and Lifetimes
627627

628+
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
629+
of time is bound by, at most, the lifetime of the underlying transport protocol connection lifetime. Beyond that, each interaction pattern imposes
630+
lifetime based on a sequence of interactions between Requester and Responder.
631+
628632
In the section below, "RQ -> RS" refers to Requester sending a frame to a Responder. And "RS -> RQ" refers to Responder sending
629633
a frame to a Requester.
630634

631635
In the section below, "*" refers to 0 or more and "+" refers to 1 or more.
632636

637+
Once a stream has "terminated", the Stream ID can be "forgotten" by the Requester and Responder. An implementation MAY re-use an ID at this
638+
time, but it is recommended that an implementation not aggressively re-use IDs.
639+
633640
### Request Response
634641

635642
1. RQ -> RS: REQUEST_RESPONSE

0 commit comments

Comments
 (0)