proxygen
State.cpp
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 #include <fizz/client/State.h>
10 
13 
14 namespace fizz {
15 
17  switch (state) {
18  case StateEnum::Uninitialized:
19  return "Uninitialized";
20  case StateEnum::ExpectingServerHello:
21  return "ExpectingServerHello";
22  case StateEnum::ExpectingEncryptedExtensions:
23  return "ExpectingEncryptedExtensions";
24  case StateEnum::ExpectingCertificate:
25  return "ExpectingCertificate";
26  case StateEnum::ExpectingCertificateVerify:
27  return "ExpectingCertificateVerify";
28  case StateEnum::ExpectingFinished:
29  return "ExpectingFinished";
30  case StateEnum::Established:
31  return "Established";
32  case StateEnum::Error:
33  return "Error";
34  case StateEnum::NUM_STATES:
35  return "Invalid state NUM_STATES";
36  }
37  return "Invalid state";
38 }
39 
41  switch (auth) {
42  case ClientAuthType::NotRequested:
43  return "NotRequested";
44  case ClientAuthType::Sent:
45  return "Sent";
46  case ClientAuthType::RequestedNoMatch:
47  return "RequestedNoMatch";
48  case ClientAuthType::Stored:
49  return "Stored";
50  }
51  return "Invalid client auth type";
52 }
53 } // namespace fizz
ClientAuthType
Definition: State.h:42
folly::StringPiece toString(StateEnum state)
Definition: State.cpp:16
StateEnum
Definition: Actions.h:16
error_stage Error
state
Definition: http_parser.c:272