spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.72k stars 38.15k forks source link

Support Flux in, Flux out for WebSocketSession in WebFlux #25355

Open bruto0 opened 4 years ago

bruto0 commented 4 years ago

WebSocketClient as of Webflux 5.2.7 offers only 2 execute methods which confine programmer's logic to WebSocketHandler implementation he passes there. However, it would've been useful in some cases to expose the received Flux to the outside scope in order to enable its composition with other WS sessions (or reactive functions in general) If such usage pattern is a first-class API method in RSocket, then it's probably been requested often enough

example implementation: https://stackoverflow.com/questions/62249016/sending-output-of-one-websocket-client-as-input-to-another

bruto0 commented 3 years ago

any kind of feedback would've been nice @rstoyanchev ?

rstoyanchev commented 3 years ago

Yes, it is a reasonable request and probably feasible but something to explore.