proxygen
fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor Class Reference
Inheritance diagram for fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor:

Public Member Functions

 ActionMoveVisitor (AsyncFizzServerT< SM > &server)
 
void operator() (DeliverAppData &)
 
void operator() (WriteToSocket &)
 
void operator() (ReportEarlyHandshakeSuccess &)
 
void operator() (ReportHandshakeSuccess &)
 
void operator() (ReportError &)
 
void operator() (WaitForData &)
 
void operator() (MutateState &)
 
void operator() (AttemptVersionFallback &)
 

Private Attributes

AsyncFizzServerT< SM > & server_
 

Detailed Description

template<typename SM>
class fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor

Definition at line 105 of file AsyncFizzServer.h.

Constructor & Destructor Documentation

template<typename SM>
fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::ActionMoveVisitor ( AsyncFizzServerT< SM > &  server)
inlineexplicit

Definition at line 107 of file AsyncFizzServer.h.

108  : server_(server) {}

Member Function Documentation

template<typename SM >
void fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::operator() ( DeliverAppData data)

Definition at line 233 of file AsyncFizzServer-inl.h.

References fizz::DeliverAppData::data, and folly::gen::move.

233  {
234  server_.deliverAppData(std::move(data.data));
235 }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
template<typename SM >
void fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::operator() ( WriteToSocket data)

Definition at line 238 of file AsyncFizzServer-inl.h.

References fizz::WriteToSocket::callback, fizz::WriteToSocket::contents, fizz::WriteToSocket::flags, i, and folly::gen::move.

238  {
239  DCHECK(!data.contents.empty());
240  Buf allData = std::move(data.contents.front().data);
241  for (size_t i = 1; i < data.contents.size(); ++i) {
242  allData->prependChain(std::move(data.contents[i].data));
243  }
244  server_.transport_->writeChain(data.callback, std::move(allData), data.flags);
245 }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
template<typename SM >
void fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::operator() ( ReportEarlyHandshakeSuccess )

Definition at line 248 of file AsyncFizzServer-inl.h.

249  {
250  if (server_.handshakeCallback_) {
251  auto callback = server_.handshakeCallback_;
252  server_.handshakeCallback_ = nullptr;
253  callback->fizzHandshakeSuccess(&server_);
254  }
255 }
template<typename SM >
void fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::operator() ( ReportHandshakeSuccess )

Definition at line 258 of file AsyncFizzServer-inl.h.

259  {
260  if (server_.handshakeCallback_) {
261  auto callback = server_.handshakeCallback_;
262  server_.handshakeCallback_ = nullptr;
263  callback->fizzHandshakeSuccess(&server_);
264  }
265 }
template<typename SM >
void fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::operator() ( ReportError error)
template<typename SM >
void fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::operator() ( WaitForData )

Definition at line 276 of file AsyncFizzServer-inl.h.

276  {
277  server_.fizzServer_.waitForData();
278 
279  if (server_.handshakeCallback_) {
280  // Make sure that the read callback is installed.
281  server_.startTransportReads();
282  }
283 }
template<typename SM >
void fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::operator() ( MutateState mutator)

Definition at line 286 of file AsyncFizzServer-inl.h.

286  {
287  mutator(server_.state_);
288 }
template<typename SM >
void fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::operator() ( AttemptVersionFallback fallback)

Definition at line 291 of file AsyncFizzServer-inl.h.

References fizz::server::AttemptVersionFallback::clientHello, and folly::gen::move.

292  {
293  if (!server_.handshakeCallback_) {
294  VLOG(2) << "fizz fallback without callback";
295  return;
296  }
297  auto callback = server_.handshakeCallback_;
298  server_.handshakeCallback_ = nullptr;
299  if (!server_.transportReadBuf_.empty()) {
300  fallback.clientHello->prependChain(server_.transportReadBuf_.move());
301  }
302  callback->fizzHandshakeAttemptFallback(std::move(fallback.clientHello));
303 }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Data Documentation

template<typename SM>
AsyncFizzServerT<SM>& fizz::server::AsyncFizzServerT< SM >::ActionMoveVisitor::server_
private

Definition at line 120 of file AsyncFizzServer.h.


The documentation for this class was generated from the following files: