cch1 / http.async.client

Async Http Client - Clojure
http://cch1.github.com/http.async.client
267 stars 40 forks source link

Thoughts on implementing PingWebSocketFrame and PongWebSocketFrame #84

Open devth opened 4 years ago

devth commented 4 years ago

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?

cch1 commented 4 years ago

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?

devth commented 4 years ago

Ah, I see. It looks like ping/pong examples I've seen are for Netty 4:

I've since switched to https://github.com/schmee/java-http-clj since it already supports this (though it requires Java 11+).