Cannot use 'subscribe' or 'subscribeWith' with 'ReactorNettyWebSocketClient' in Kotlin
问题 The Kotlin code below successfully connects to a Spring WebFlux server, sends a message and prints each message sent via the stream that is returned. fun main(args: Array<String>) { val uri = URI("ws://localhost:8080/myservice") val client = ReactorNettyWebSocketClient() val input = Flux.just(readMsg()) client.execute(uri) { session -> session.send(input.map(session::textMessage)) .thenMany( session.receive() .map(WebSocketMessage::getPayloadAsText) .doOnNext(::println) // want to replace