Example usage for io.vertx.core.http HttpServerResponse writeCustomFrame

List of usage examples for io.vertx.core.http HttpServerResponse writeCustomFrame

Introduction

In this page you can find the example usage for io.vertx.core.http HttpServerResponse writeCustomFrame.

Prototype

@Fluent
HttpServerResponse writeCustomFrame(int type, int flags, Buffer payload);

Source Link

Document

Write an HTTP/2 frame to the response, allowing to extend the HTTP/2 protocol.<p> The frame is sent immediatly and is not subject to flow control.

Usage

From source file:examples.HTTP2Examples.java

License:Open Source License

public void example2(HttpServerResponse response) {

    int frameType = 40;
    int frameStatus = 10;
    Buffer payload = Buffer.buffer("some data");

    // Sending a frame to the client
    response.writeCustomFrame(frameType, frameStatus, payload);
}