proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
CodecProtocol.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015-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. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
*/
10
#pragma once
11
12
#include <cstdint>
13
#include <
folly/Optional.h
>
14
#include <
proxygen/lib/utils/Export.h
>
15
#include <string>
16
17
namespace
proxygen
{
18
19
enum class
CodecProtocol
:
uint8_t
{
20
HTTP_1_1
,
21
SPDY_3
,
22
SPDY_3_1
,
23
HTTP_2
,
24
HQ
,
25
};
26
30
extern
const
std::string
&
getCodecProtocolString
(
CodecProtocol
);
31
35
extern
bool
isValidCodecProtocolStr
(
const
std::string
& protocolStr);
36
41
extern
CodecProtocol
getCodecProtocolFromStr
(
const
std::string
& protocolStr);
42
46
FB_EXPORT
extern
bool
isSpdyCodecProtocol
(
CodecProtocol
protocol);
47
51
extern
bool
isHTTP2CodecProtocol
(
CodecProtocol
protocol);
52
56
extern
bool
isHQCodecProtocol
(
CodecProtocol
protocol);
57
61
extern
bool
isParallelCodecProtocol
(
CodecProtocol
protocol);
62
67
extern
folly::Optional<std::pair<CodecProtocol, std::string>
>
68
checkForProtocolUpgrade
(
const
std::string
& clientUpgrade,
69
const
std::string
& serverUpgrade,
70
bool
serverMode);
71
72
}
FB_EXPORT
#define FB_EXPORT
Definition:
Export.h:26
Export.h
proxygen::CodecProtocol::HTTP_2
proxygen::isHQCodecProtocol
bool isHQCodecProtocol(CodecProtocol protocol)
Definition:
CodecProtocol.cpp:82
proxygen::CodecProtocol::HQ
proxygen::CodecProtocol::SPDY_3_1
folly::Optional
Definition:
Optional.h:71
proxygen::checkForProtocolUpgrade
folly::Optional< std::pair< CodecProtocol, std::string > > checkForProtocolUpgrade(const std::string &clientUpgrade, const std::string &serverUpgrade, bool serverMode)
Definition:
CodecProtocol.cpp:91
uint8_t
uint8_t
Definition:
ConstexprMathBenchmark.cpp:178
proxygen::getCodecProtocolString
const std::string & getCodecProtocolString(CodecProtocol proto)
Definition:
CodecProtocol.cpp:47
proxygen::CodecProtocol::HTTP_1_1
proxygen::isSpdyCodecProtocol
bool isSpdyCodecProtocol(CodecProtocol protocol)
Definition:
CodecProtocol.cpp:73
proxygen::isParallelCodecProtocol
bool isParallelCodecProtocol(CodecProtocol protocol)
Definition:
CodecProtocol.cpp:86
string
const char * string
Definition:
Conv.cpp:212
proxygen
Definition:
ExMessageHandler.h:14
proxygen::CodecProtocol::SPDY_3
proxygen::isHTTP2CodecProtocol
bool isHTTP2CodecProtocol(CodecProtocol protocol)
Definition:
CodecProtocol.cpp:78
proxygen::getCodecProtocolFromStr
CodecProtocol getCodecProtocolFromStr(const std::string &protocolStr)
Definition:
CodecProtocol.cpp:69
proxygen::isValidCodecProtocolStr
bool isValidCodecProtocolStr(const std::string &protocolStr)
Definition:
CodecProtocol.cpp:59
proxygen::CodecProtocol
CodecProtocol
Definition:
CodecProtocol.h:19
Optional.h
proxygen
lib
http
codec
CodecProtocol.h
Generated by
1.8.11