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

Incorrect FrameType for handling RequestStream Frame. #25

Open
DXTkastb opened this issue Dec 27, 2022 · 0 comments
Open

Incorrect FrameType for handling RequestStream Frame. #25

DXTkastb opened this issue Dec 27, 2022 · 0 comments

Comments

@DXTkastb
Copy link

Expected Behavior

Should receive message stream from dart client

Actual Behavior

Received error :

type 'RequestFNFFrame' is not a subtype of type 'RequestStreamFrame' in type cast
#0      RSocketRequester.receiveFrame (package:rsocket/core/rsocket_requester.dart:290:40)
#1      RSocketRequester.receiveChunk (package:rsocket/core/rsocket_requester.dart:205:9)

Steps to Reproduce

Dart Client (Responder) :

List<int> list = 'this is client response!'.codeUnits;
Uint8List data = Uint8List.fromList(list);

RSocketConnector connector = RSocketConnector.create().acceptor(requestStreamAcceptor((payload) {
	List<Payload> randomPayloadList = [Payload.from(null, data)];
        return Stream.fromIterable(randomPayloadList);
}));

var rsocket = await connector.connect("ws://localhost:7000/rsocket");

Spring Server (Requester):

 rsocketRequester.route("").data("this is server reqeust!")
                .retrieveFlux(String.class).subscribe((v) -> {
                   System.out.println(v);
             });

Possible Solution

case frame_types.REQUEST_STREAM:
frame = RequestFNFFrame.fromBuffer(header, byteBuffer);
break;

should be replaced with :

    case frame_types.REQUEST_STREAM:
      frame = RequestStreamFrame.fromBuffer(header, byteBuffer);  // correct frame
      break;
  • RSocket version(s) used: 1.0.0
  • java : openjdk 17.0.5
  • Spring Boot Server
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