proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
TransportDirection.cpp
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
#include <
proxygen/lib/http/codec/TransportDirection.h
>
11
12
#include <ostream>
13
14
namespace
proxygen
{
15
16
const
char
*
getTransportDirectionString
(
TransportDirection
dir) {
17
switch
(dir) {
18
case
TransportDirection::UPSTREAM
:
return
"upstream"
;
19
case
TransportDirection::DOWNSTREAM
:
return
"downstream"
;
20
}
21
// unreachable
22
return
""
;
23
}
24
25
TransportDirection
operator!
(
TransportDirection
dir) {
26
return
dir ==
TransportDirection::DOWNSTREAM
?
27
TransportDirection::UPSTREAM
:
TransportDirection::DOWNSTREAM
;
28
}
29
30
std::ostream&
operator<<
(std::ostream& os,
const
TransportDirection
dir) {
31
os <<
getTransportDirectionString
(dir);
32
return
os;
33
}
34
35
}
proxygen::operator!
TransportDirection operator!(TransportDirection dir)
Definition:
TransportDirection.cpp:25
proxygen::operator<<
std::ostream & operator<<(std::ostream &os, const HeaderTable &table)
Definition:
HeaderTable.cpp:254
proxygen::getTransportDirectionString
const char * getTransportDirectionString(TransportDirection dir)
Definition:
TransportDirection.cpp:16
proxygen::TransportDirection::DOWNSTREAM
TransportDirection.h
proxygen::TransportDirection
TransportDirection
Definition:
TransportDirection.h:17
proxygen::TransportDirection::UPSTREAM
proxygen
Definition:
ExMessageHandler.h:14
proxygen
lib
http
codec
TransportDirection.cpp
Generated by
1.8.11