https://kotlinlang.org logo
#ktor
Title
# ktor
l

Lg

07/23/2021, 7:26 PM
Hello, I’m creating a WebSocket client in ktor and I’m successfully streaming data from one path, however, I’ve not been successful in trying to configure the client to consume a second path’s stream for the same host. I’ve seen examples of configuring routing for a WebSocket server and am wondering if there’s a clearer way to configure mapping each path to its own handler
Copy code
val client = HttpClient {
    install(WebSockets)
}

client.webSocket(HttpMethod.Get, host, port, path) { … }
a

Aleksei Tirman [JB]

07/26/2021, 11:52 AM
Could you please share a complete code example?
7 Views