mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-05-02 20:09:31 +01:00
Merge branch '6.2.x'
This commit is contained in:
@@ -310,7 +310,7 @@ Java::
|
|||||||
Flux<String> source = ... ;
|
Flux<String> source = ... ;
|
||||||
Mono<Void> output = session.send(source.map(session::textMessage)); <2>
|
Mono<Void> output = session.send(source.map(session::textMessage)); <2>
|
||||||
|
|
||||||
return Mono.zip(input, output).then(); <3>
|
return input.and(output); <3>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@@ -338,7 +338,7 @@ Kotlin::
|
|||||||
val source: Flux<String> = ...
|
val source: Flux<String> = ...
|
||||||
val output = session.send(source.map(session::textMessage)) // <2>
|
val output = session.send(source.map(session::textMessage)) // <2>
|
||||||
|
|
||||||
return Mono.zip(input, output).then() // <3>
|
return input.and(output) // <3>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|||||||
+1
-1
@@ -216,7 +216,7 @@ public class ServletServerHttpRequest implements ServerHttpRequest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InetSocketAddress getRemoteAddress() {
|
public InetSocketAddress getRemoteAddress() {
|
||||||
return new InetSocketAddress(this.servletRequest.getRemoteHost(), this.servletRequest.getRemotePort());
|
return new InetSocketAddress(this.servletRequest.getRemoteAddr(), this.servletRequest.getRemotePort());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+2
-2
@@ -63,7 +63,7 @@ import reactor.core.publisher.Mono;
|
|||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* <p>If processing inbound and sending outbound messages are independent
|
* <p>If processing inbound and sending outbound messages are independent
|
||||||
* streams, they can be joined together with the "zip" operator:
|
* streams, they can be joined together with the "and" operator:
|
||||||
*
|
*
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* class ExampleHandler implements WebSocketHandler {
|
* class ExampleHandler implements WebSocketHandler {
|
||||||
@@ -83,7 +83,7 @@ import reactor.core.publisher.Mono;
|
|||||||
* Flux<String> source = ... ;
|
* Flux<String> source = ... ;
|
||||||
* Mono<Void> output = session.send(source.map(session::textMessage));
|
* Mono<Void> output = session.send(source.map(session::textMessage));
|
||||||
*
|
*
|
||||||
* return Mono.zip(input, output).then();
|
* return input.and(output);
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
|
|||||||
Reference in New Issue
Block a user