Sudhanshu Singh
09/22/2023, 8:50 PMio.ktor.network.tls.TLSException: Received alert during handshake. Level: FATAL, code: ProtocolVersion
at io.ktor.network.tls.TLSClientHandshake$input$1.invokeSuspend(TLSClientHandshake.kt:70)
The client configuration is
val client = HttpClient {
install(WebSockets)
client.webSocket(
urlString = "<wss://sample.com/websocket>",
) {
for (frame in incoming) {
if (frame is Frame.Text) {
val messageJson = frame.readText()
// log
}
}
}
Aleksei Tirman [JB]
09/25/2023, 6:10 AMval client = HttpClient {
install(WebSockets)
}
client.webSocket(urlString = "<wss://ws.postman-echo.com/raw>") {
for (frame in incoming) {
if (frame is Frame.Text) {
val messageJson = frame.readText()
}
}
}
Sudhanshu Singh
09/25/2023, 8:40 AMclient.websocket
throws error when i connect to my websocket.
is there anyway to enable TLS so that below error isn't thrown?
io.ktor.network.tls.TLSException: Received alert during handshake. Level: FATAL, code: ProtocolVersion
at io.ktor.network.tls.TLSClientHandshake$input$1.invokeSuspend(TLSClientHandshake.kt:70)
Aleksei Tirman [JB]
09/25/2023, 9:05 AMSudhanshu Singh
09/25/2023, 9:06 AM