private static ByteBuf createSettingsFrame(ChannelHandlerContext ctx, ByteBuf payload) {
        final ByteBuf frame = ctx.alloc().buffer(FRAME_HEADER_LENGTH + payload.readableBytes());
        writeFrameHeader(frame, payload.readableBytes(), SETTINGS, new Http2Flags(), 0);
        frame.writeBytes(payload);
        payload.release();
        return frame;
    }
Creates an HTTP2-Settings header with the given payload. The payload buffer is released.
core/src/main/java/com/linecorp/armeria/server/Http2ServerUpgradeCodec.java