http.async.client
http.async.client copied to clipboard
Thoughts on implementing PingWebSocketFrame and PongWebSocketFrame
I'm consuming a websocket hosted on heroku which closes if there's no activity on the websocket in a timeout, usually 30 seconds. It looks like Netty has the concept of ping/pong for this purpose. Thoughts about implementing it in this lib?
Which version of Netty? This lib depends AHC which depends on Netty. But the version of AHC in use here (1.9.40) is not up-to-date and references netty 3.106. Updating AHC is not trivial but it is on the roadmap. WOudl you be interested in contributing to updating the AHC 2.X?
Ah, I see. It looks like ping/pong examples I've seen are for Netty 4:
- https://stackoverflow.com/questions/38590578/how-to-handle-ping-pong-frame-in-netty-4
- https://gist.github.com/Topher-the-Geek/6729681
I've since switched to https://github.com/schmee/java-http-clj since it already supports this (though it requires Java 11+).