aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-uws/src/Http3ResponseData.h
blob: 6f8ad743c6d3d2e5a9636a98fe054533cd5fc865 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef UWS_H3RESPONSEDATA_H
#define UWS_H3RESPONSEDATA_H

#include "MoveOnlyFunction.h"
#include "AsyncSocketData.h"
#include <string_view>

namespace uWS {
    struct Http3ResponseData {

        MoveOnlyFunction<void()> onAborted = nullptr;
        MoveOnlyFunction<void(std::string_view, bool)> onData = nullptr;
        MoveOnlyFunction<bool(uintmax_t)> onWritable = nullptr;

        /* Status is always first header just like for h1 */
        unsigned int headerOffset = 0;
        
        /* Write offset */
        uintmax_t offset = 0;

        BackPressure backpressure;
    };
}

#endif