http.async.client icon indicating copy to clipboard operation
http.async.client copied to clipboard

Thoughts on implementing PingWebSocketFrame and PongWebSocketFrame

Open devth opened this issue 5 years ago • 2 comments

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?

devth avatar Jan 30 '20 20:01 devth

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?

cch1 avatar Feb 19 '20 22:02 cch1

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+).

devth avatar Feb 19 '20 22:02 devth