rsocket / rsocket-kotlin

RSocket Kotlin multi-platform implementation
http://rsocket.io
Apache License 2.0
553 stars 37 forks source link

Bug with flow.buffer(2).take(2) #97

Closed yschimke closed 4 years ago

yschimke commented 4 years ago

From https://github.com/yschimke/rsocket-cli/pull/1

Total request is 4

Send:
RequestStream frame -> Stream Id: 1 Length: 13
Flags: 0b100000000 (M1F0C0N0)
Initial request: 2
Metadata: Empty
Data: Empty

Receive:
Payload frame -> Stream Id: 1 Length: 19
Flags: 0b000100000 (M0F0C0N1)
Data(length=13):
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 31 35 39 39 38 35 30 30 39 31 34 31 34          |1599850091414   |
+--------+-------------------------------------------------+----------------+

1599850091414

Receive:
Payload frame -> Stream Id: 1 Length: 19
Flags: 0b000100000 (M0F0C0N1)
Data(length=13):
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 31 35 39 39 38 35 30 30 39 31 34 36 34          |1599850091464   |
+--------+-------------------------------------------------+----------------+

Send:
RequestN frame -> Stream Id: 1 Length: 10
Flags: 0b000000000 ()
RequestN: 2

1599850091464

Send:
Cancel frame -> Stream Id: 1 Length: 6
Flags: 0b000000000 ()