Closed jeffreydwalter closed 8 years ago
@indutny any thoughts on this? Does my question/request make sense?
Sorry for not replying in time, @jeffreydwalter ! Sure this makes total sense. I have a suggestion though, what if the event will be named just ping
and will have id
as a first and the only argument? Also is there any point in emitting it after sending the reply? There is no guarantee that it was handled by other side, and thus probably no point in postponing the event until then.
Anyway, would you be interested in contributing this feature to node-spdy? ;)
I'm okay with naming it ping and including the id. I don't guess it matters whether we raise the event before or after the call to write(). I'll go ahead and make a pull request.
Thanks man!
I have a need to track, and take action, when a spdy ping is received from my spdy client. In the client/server I'm building, we're tunneling spdy over persistent tls connections and we're using ping to track network connectivity loss in the event of unclean socket closure (switch networks, close laptop, etc.)
Something like this: https://gist.github.com/jeffreydwalter/c4c540f6085a7e69c720
Is there currently a way to do what I'm after? If no, what do you think about this suggestion?