How to write a HTTP + WebSocket server using Netty
Irunika Weeraratne


Thanks so much for this. I had been trying to figure out why all my own implementations of websockets worked fine with my server but no external tools I was testing with could finish the connection. Turns out even libwebsockets in C had the same problem. All it came down to was properly handling the http side of things which isn’t actually mentioned anywhere in the netty docs.

One more thing I wanted to ask, Netty already has a class for handling upgrades (HttpServerUpgradeHandler) do you think that class would be able to be leveraged to perform this same action? Currently they don’t seem to have the necessary code in place to do it, but I imagine it would be a similar amount of effort to get it working and would align better with Netty’s design.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.