Hi,
HTTP/2 has pingability that Vert.x implements at the connection level.
I think you can use the HttpClient wrapped by the WebClient and then
set a connection handler that ping the connection on a regular basis,
e.g
HttpClient client = // get http client
client.connectionHandler(conn -> {
// Called when a connection is established
int timerID = vertx.setPeriodic(5000, id_ -> {
conn.ping(data).onComplete(ar -> /* handle pong */);;
});
conn.closeHandler(v -> vertx.cancelTimer(timerID));
});
Julien
> --
> You received this message because you are subscribed to the Google Groups "vert.x" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
vertx+un...@googlegroups.com.
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/vertx/8edea112-5673-4b1b-bb64-48f7256632dfn%40googlegroups.com.