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/client/PskCache.h
>
13
#include <
fizz/protocol/Actions.h
>
14
#include <
fizz/protocol/Params.h
>
15
16
namespace
fizz
{
17
namespace
client {
18
19
class
State
;
20
24
using
MutateState
=
folly::Function<void(State&)>
;
25
33
struct
ReportEarlyHandshakeSuccess
{
34
uint32_t
maxEarlyDataSize
{0};
35
};
36
44
struct
ReportHandshakeSuccess
{
45
bool
earlyDataAccepted{
false
};
46
};
47
57
struct
ReportEarlyWriteFailed
{
58
EarlyAppWrite
write
;
59
};
60
66
struct
NewCachedPsk
{
67
CachedPsk
psk
;
68
};
69
70
using
Action
= boost::variant<
71
DeliverAppData
,
72
WriteToSocket
,
73
ReportHandshakeSuccess
,
74
ReportEarlyHandshakeSuccess
,
75
ReportEarlyWriteFailed
,
76
ReportError
,
77
MutateState
,
78
WaitForData
,
79
NewCachedPsk
>;
80
// TODO use small_vector once we are sure it is portable.
81
using
Actions
= std::vector<Action>;
82
83
namespace
detail
{
84
85
template
<
typename
...
Args
>
86
Actions
actions
(
Args
&&... act) {
87
Actions
acts;
88
fizz::detail::addAction
(acts, std::forward<Args>(act)...);
89
return
acts;
90
}
91
}
// namespace detail
92
}
// namespace client
93
}
// namespace fizz
fizz::EarlyAppWrite
Definition:
Params.h:46
fizz::server::detail::actions
Actions actions(Args &&...act)
Definition:
Actions.h:57
Actions.h
fizz::client::MutateState
folly::Function< void(State &)> MutateState
Definition:
Actions.h:24
fizz::client::ReportEarlyWriteFailed
Definition:
Actions.h:57
PskCache.h
fizz::client::CachedPsk
Definition:
PskCache.h:20
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::client::Action
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition:
Actions.h:79
fizz::WriteToSocket
Definition:
Actions.h:36
fizz::client::NewCachedPsk::psk
CachedPsk psk
Definition:
Actions.h:67
fizz::client::ReportHandshakeSuccess
Definition:
Actions.h:44
detail
Definition:
HashBenchmark.cpp:32
fizz::client::Actions
std::vector< Action > Actions
Definition:
Actions.h:81
fizz::client::ReportEarlyHandshakeSuccess
Definition:
Actions.h:33
fizz::client::ReportEarlyWriteFailed::write
EarlyAppWrite write
Definition:
Actions.h:58
fizz::detail::addAction
void addAction(ActionsType &)
Definition:
Actions.h:67
fizz
Definition:
Actions.h:16
fizz::client::State
Definition:
State.h:58
folly::Function
Definition:
Function.h:235
Params.h
uint32_t
uint32_t
Definition:
ConstexprMathBenchmark.cpp:186
fizz::WaitForData
Definition:
Actions.h:62
fizz::client::NewCachedPsk
Definition:
Actions.h:66
fizz::client::ReportEarlyHandshakeSuccess::maxEarlyDataSize
uint32_t maxEarlyDataSize
Definition:
Actions.h:34
proxygen
fizz
fizz
client
Actions.h
Generated by
1.8.11