Skip to content

Commit 807c02e

Browse files
clarify request(n) being cumulative (rsocket#203)
1 parent d271123 commit 807c02e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Protocol.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ Frame Contents
502502
* __Initial Request N__: (31 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit integer representing the initial number of items to request. Value MUST be > 0.
503503
* __Request Data__: identification of the service being requested along with parameters for the request.
504504

505-
See Flow Control: Reactive Streams Semantics for more information on RequestN behavior.
505+
See [Flow Control: Reactive Streams Semantics](#flow-control-reactive-streams) for more information on RequestN behavior.
506506

507507
<a name="frame-request-channel"></a>
508508
### REQUEST_CHANNEL Frame (0x07)
@@ -1110,7 +1110,9 @@ There are multiple flow control mechanics provided by the protocol.
11101110
<a name="flow-control-reactive-streams"></a>
11111111
#### Reactive Streams Semantics
11121112

1113-
[Reactive Streams](http://www.reactive-streams.org/) semantics for flow control of Streams, Subscriptions, and Channels.
1113+
[Reactive Streams](http://www.reactive-streams.org/) semantics are used for flow control of Streams, Subscriptions, and Channels. This is a credit-based model where the Requester grants the Responder credit for the number of PAYLOADs it can send. It is sometimes referred to as "request-n" or "request(n)".
1114+
1115+
Credits are cumulative. Once credits are granted from Requester to Responder, they cannot be revoked. For example, sending `request(3)` and `request(2)` accumulates to a value of 5, allowing the Responder to send 5 PAYLOADs.
11141116

11151117
Please note that this explicitly does NOT follow rule number 17 in https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.0/README.md#3-subscription-code
11161118

0 commit comments

Comments
 (0)