Skip to content

Commit c165dd5

Browse files
committed
Update Javadoc of reactive WebSocketHandler
Replace suggestion to use zip with and operator. Closes gh-35572
1 parent 449b85f commit c165dd5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

framework-docs/modules/ROOT/pages/web/webflux-websocket.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
----

spring-webflux/src/main/java/org/springframework/web/reactive/socket/WebSocketHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
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 {
@@ -83,7 +83,7 @@
8383
* Flux&lt;String&gt; source = ... ;
8484
* Mono&lt;Void&gt; output = session.send(source.map(session::textMessage));
8585
*
86-
* return Mono.zip(input, output).then();
86+
* return input.and(output);
8787
* }
8888
* }
8989
* </pre>

0 commit comments

Comments
 (0)