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

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

Introduction

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

Prototype

@Fluent
default HttpConnection goAway(long errorCode) 

Source Link

Document

Like #goAway(long,int) with a last stream id -1 which means to disallow any new stream creation.

Usage

From source file:examples.HTTP2Examples.java

License:Open Source License

public void example26(HttpConnection connection) {
    connection.goAway(0);
}

From source file:examples.HTTP2Examples.java

License:Open Source License

public void example28(HttpConnection connection) {
    connection.goAway(0);
    connection.shutdownHandler(v -> {

        // All streams are closed, close the connection
        connection.close();//www  .  j  av  a  2  s . c  o  m
    });
}