File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
framework-docs/modules/ROOT/pages/web
spring-webflux/src/main/java/org/springframework/web/reactive/socket Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ Java::
310310 Flux<String> source = ... ;
311311 Mono<Void> output = session.send(source.map(session::textMessage)); <2>
312312
313- return Mono.zip(input, output).then(); <3>
313+ return input.and( output); <3>
314314 }
315315 }
316316----
@@ -338,7 +338,7 @@ Kotlin::
338338 val source: Flux<String> = ...
339339 val output = session.send(source.map(session::textMessage)) // <2>
340340
341- return Mono.zip(input, output).then() // <3>
341+ return input.and( output) // <3>
342342 }
343343 }
344344----
Original file line number Diff line number Diff line change 6363 * </pre>
6464 *
6565 * <p>If processing inbound and sending outbound messages are independent
66- * streams, they can be joined together with the "zip " operator:
66+ * streams, they can be joined together with the "and " operator:
6767 *
6868 * <pre class="code">
6969 * class ExampleHandler implements WebSocketHandler {
8383 * Flux<String> source = ... ;
8484 * Mono<Void> output = session.send(source.map(session::textMessage));
8585 *
86- * return Mono.zip( input, output).then( );
86+ * return input.and(output );
8787 * }
8888 * }
8989 * </pre>
You can’t perform that action at this time.
0 commit comments