https://kotlinlang.org logo
#server
Title
# server
s

solonovamax

09/06/2023, 6:24 PM
can you not add websockets to the netty server? (I forgor to reply to the message above in a thread)
a

Andrew O'Hara

09/06/2023, 11:47 PM
You can. Netty is just terrible at explaining how to do anything. Http4k has a plugin that adds WS support through Netty, so you can either use that, or use its adapter as a starting point. https://github.com/http4k/http4k/tree/master/http4k-server/netty/src/main/kotlin/org/http4k/server
h

hello

09/07/2023, 10:37 AM
Ah yeah thats much more neat. And the adaptor has some nice extra functionality Thanks both!
a

Andrew O'Hara

09/07/2023, 11:30 AM
Ah sorry, I misread and thought solonovamax's comment was an original question. My example showed how to make a WS server with Netty, but it seems like you want to make a client? I'm not sure what exactly you're trying to do, because you already seem to have a client, but it seems like I was able to help anyway, so 👍 . If you need any more help, you can try adding some clarification.