How do I send PING using h2_client?
arkadiyk opened this issue · comments
My firewall kills connection after 30 min idle time..
Looks like h2_connection
has a send_frame/2
function. A ping frame can be represented with <<0, 0, 8, 6, 0, 0, 0, 0, 0>>
.
In Elixir I think it would be as simple as :h2_connection.send_frame(pid, <<0, 0, 8, 6, 0, 0, 0, 0, 0>>)
I'm having difficulty getting any sort of ping ACK though, so no clue if it's actually working.
There's a more elegant solution, but this reply is just to help unblock whatever you're working on.
PING frames require a payload. You're just sending the frame header. The PING frame needs an 8 byte payload, which the ACK will send back for you to confirm. https://http2.github.io/http2-spec/#PING
This PR adds ping API: #107
Closing since the PR was merged.