Example usage for io.vertx.core.http HttpConnection ping

List of usage examples for io.vertx.core.http HttpConnection ping

Introduction

In this page you can find the example usage for io.vertx.core.http HttpConnection ping.

Prototype

@Fluent
HttpConnection ping(Buffer data, Handler<AsyncResult<Buffer>> pongHandler);

Source Link

Document

Send a PING frame to the remote endpoint.

Usage

From source file:examples.HTTP2Examples.java

License:Open Source License

public void example23(HttpConnection connection) {
    Buffer data = Buffer.buffer();
    for (byte i = 0; i < 8; i++) {
        data.appendByte(i);//www  .  ja  v  a 2 s. com
    }
    connection.ping(data, pong -> {
        System.out.println("Remote side replied");
    });
}