proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Actions.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.
7
*/
8
9
#pragma once
10
11
#include <boost/variant.hpp>
12
#include <
fizz/protocol/Actions.h
>
13
#include <
folly/futures/Future.h
>
14
#include <
folly/small_vector.h
>
15
16
namespace
fizz
{
17
namespace
server {
18
19
class
State
;
20
24
using
MutateState
=
folly::Function<void(State&)>
;
25
26
struct
AttemptVersionFallback
{
27
std::unique_ptr<folly::IOBuf>
clientHello
;
28
};
29
35
struct
ReportEarlyHandshakeSuccess
{};
36
40
struct
ReportHandshakeSuccess
{};
41
42
using
Action
= boost::variant<
43
DeliverAppData
,
44
WriteToSocket
,
45
ReportHandshakeSuccess
,
46
ReportEarlyHandshakeSuccess
,
47
ReportError
,
48
MutateState
,
49
WaitForData
,
50
AttemptVersionFallback
>;
51
using
Actions
=
folly::small_vector<Action, 4>
;
52
using
AsyncActions
= boost::variant<Actions, folly::Future<Actions>>;
53
54
namespace
detail
{
55
56
template
<
typename
...
Args
>
57
Actions
actions
(
Args
&&... act) {
58
Actions
acts;
59
fizz::detail::addAction
(acts, std::forward<Args>(act)...);
60
return
acts;
61
}
62
}
// namespace detail
63
}
// namespace server
64
}
// namespace fizz
fizz::server::detail::actions
Actions actions(Args &&...act)
Definition:
Actions.h:57
small_vector.h
fizz::server::AsyncActions
boost::variant< Actions, folly::Future< Actions >> AsyncActions
Definition:
Actions.h:52
Actions.h
fizz::server::Action
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportError, MutateState, WaitForData, AttemptVersionFallback > Action
Definition:
Actions.h:50
testing::Args
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
Definition:
gmock-generated-matchers.h:481
fizz::DeliverAppData
Definition:
Actions.h:22
fizz::ReportError
Definition:
Actions.h:49
fizz::WriteToSocket
Definition:
Actions.h:36
fizz::server::ReportEarlyHandshakeSuccess
Definition:
Actions.h:35
detail
Definition:
HashBenchmark.cpp:32
folly::futures::detail::State
State
See Core for details.
Definition:
Core.h:43
fizz::server::AttemptVersionFallback
Definition:
Actions.h:26
Future.h
fizz::detail::addAction
void addAction(ActionsType &)
Definition:
Actions.h:67
fizz
Definition:
Actions.h:16
folly::Function
Definition:
Function.h:235
fizz::server::ReportHandshakeSuccess
Definition:
Actions.h:40
fizz::WaitForData
Definition:
Actions.h:62
folly::small_vector
Definition:
small_vector.h:92
fizz::server::AttemptVersionFallback::clientHello
std::unique_ptr< folly::IOBuf > clientHello
Definition:
Actions.h:27
fizz::server::MutateState
folly::Function< void(State &)> MutateState
Definition:
Actions.h:24
proxygen
fizz
fizz
server
Actions.h
Generated by
1.8.11