Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compliant: "A PAYLOAD MUST NOT have both (C)complete and (N)ext empty (false)" #902

Open
conteit opened this issue Sep 10, 2020 · 0 comments

Comments

@conteit
Copy link

conteit commented Sep 10, 2020

According to official RSocket specifications: "A PAYLOAD MUST NOT have both (C)complete and (N)ext empty (false)", but rsocket-cpp does not comply with that statement when has to send fragmented frames.

This behavior breaks cross-compatibility with the Java implementation (the one I'm trying to make it work with).

Expected Behavior

Since it is emitting an "item" because its invoked by (ChannelRequester::onNext) I think that at least the (N)ext flag should be set to true.

Actual Behavior

While the client actually fragments the payload correctly with the (F)ollows flag, it sets (C)complete and (N)ext to false.

Steps to Reproduce

  • Modify the channel-hello-world example in order to send the content of a text file (bigger than 15MB) as Payload
  • Run the client against a server with fragmentation set to 15MB.

Possible Solution

Use the addFlags parameter of rsocket::SreamsWriterImpl::writeFragmented method to pass the right (N)ext and/or (C)omplete flags according to the Subscriber's method that has been invoked.

Your Environment

  • RSocket version(s) used: 1.0 (specification), rsocket-cpp commit-id: 1fff6f8
  • Other relevant libraries versions (eg. netty, ...): Spring Boot 2.3.3.RELEASE
  • Platform (eg. JVM version (java -version) or Node version (node --version)): Java 11.0.8
  • OS and version (eg uname -a): Ubuntu 20.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant