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

Abe Sol

03/23/2023, 9:14 PM
Hi! I'm a total ktor noob. I helped someone connect OPENRNDR with websockets, but it works only on localhost: https://openrndr.discourse.group/t/using-openrndr-as-a-websocket-client/532/9?u=abe I don't see examples in the ktor website for connecting to WSS servers. Any pointers as to what I should change in that code to connect to an online service? Thanks!
a

Aleksei Tirman [JB]

03/24/2023, 8:58 AM
Providing an address with the
wss
protocol should be enough. Here is an example:
Copy code
val session = client.webSocketSession("<wss://ws.postman-echo.com/raw>")
🙌 1
a

Abe Sol

03/25/2023, 9:03 AM
Thank you! 🙂
8 Views