Example usage for io.netty.handler.codec.http2 Http2Error code

List of usage examples for io.netty.handler.codec.http2 Http2Error code

Introduction

In this page you can find the example usage for io.netty.handler.codec.http2 Http2Error code.

Prototype

long code

To view the source code for io.netty.handler.codec.http2 Http2Error code.

Click Source Link

Usage

From source file:com.linecorp.armeria.internal.http.Http2ObjectEncoder.java

License:Apache License

@Override
protected ChannelFuture doWriteReset(ChannelHandlerContext ctx, int id, int streamId, Http2Error error) {
    final ChannelFuture future = validateStream(ctx, streamId);
    if (future != null) {
        return future;
    }/*from  w  w w .  j a va  2s .c  o  m*/

    return encoder.writeRstStream(ctx, streamId, error.code(), ctx.newPromise());
}

From source file:org.wso2.carbon.http2.transport.util.Http2RequestWriter.java

License:Open Source License

/**
 * Writes a stream termination request;/*  w  w  w .  jav  a  2  s  .  c  om*/
 *
 * @param streamId
 * @param code
 */
public void writeRestSreamRequest(int streamId, Http2Error code) {
    encoder.writeRstStream(chContext, streamId, code.code(), chContext.newPromise()); //sending a restStreamFrame
    chContext.flush();
}