proxygen
SecurityProtocolContextManager.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017-present Facebook, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
19 
20 namespace wangle {
21 
27  public:
32  void addPeeker(PeekingCallbackPtr peekingCallback) {
33  if (peekingCallback->getBytesRequired() > numBytes_) {
34  numBytes_ = peekingCallback->getBytesRequired();
35  }
36  peekingCallbacks_.push_back(std::move(peekingCallback));
37  }
38 
40  Acceptor* acceptor,
41  const folly::SocketAddress& clientAddr,
42  std::chrono::steady_clock::time_point acceptTime,
43  TransportInfo& tinfo) noexcept {
45  acceptor, clientAddr, acceptTime, tinfo, peekingCallbacks_, numBytes_);
46  }
47 
48  size_t getPeekBytes() const {
49  return numBytes_;
50  }
51 
52  private:
56  std::vector<PeekingCallbackPtr> peekingCallbacks_;
57 
61  size_t numBytes_{0};
62 };
63 
64 }
std::vector< PeekingCallbackPtr > peekingCallbacks_
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void addPeeker(PeekingCallbackPtr peekingCallback)
requires E e noexcept(noexcept(s.error(std::move(e))))
AcceptorHandshakeManager * getHandshakeManager(Acceptor *acceptor, const folly::SocketAddress &clientAddr, std::chrono::steady_clock::time_point acceptTime, TransportInfo &tinfo) noexcept