proxygen
HPACKDecoderBase.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 #pragma once
11 
16 
17 namespace proxygen {
18 
19 class HeaderTable;
20 
25  public:
27  uint32_t tableSize,
28  uint32_t maxUncompressed)
29  : maxTableSize_(tableSize)
30  , maxUncompressed_(maxUncompressed) {}
31 
32  using headers_t = std::vector<HPACKHeader>;
33 
35  return err_;
36  }
37 
38  bool hasError() const {
40  }
41 
43  maxTableSize_ = maxSize;
44  }
45 
46  void setMaxUncompressed(uint64_t maxUncompressed) {
47  maxUncompressed_ = maxUncompressed;
48  }
49 
50  protected:
51  uint32_t emit(const HPACKHeader& header,
52  HPACK::StreamingCallback* streamingCb,
53  headers_t* emitted);
54 
55  void completeDecode(
57  HPACK::StreamingCallback* streamingCb,
58  uint32_t compressedSize,
59  uint32_t emittedSize);
60 
62 
66 };
67 
68 }
HPACK::DecodeError getError() const
HPACKDecoderBase(uint32_t tableSize, uint32_t maxUncompressed)
void setMaxUncompressed(uint64_t maxUncompressed)
std::vector< HPACKHeader > headers_t
PskType type
void handleTableSizeUpdate(HPACKDecodeBuffer &dbuf, HeaderTable &table)
uint32_t emit(const HPACKHeader &header, HPACK::StreamingCallback *streamingCb, headers_t *emitted)
void completeDecode(HeaderCodec::Type type, HPACK::StreamingCallback *streamingCb, uint32_t compressedSize, uint32_t emittedSize)
void setHeaderTableMaxSize(uint32_t maxSize)