proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
EchoHandler.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 <
folly/Memory.h
>
13
#include <
proxygen/httpserver/RequestHandler.h
>
14
15
namespace
proxygen
{
16
class
ResponseHandler;
17
}
18
19
namespace
EchoService
{
20
21
class
EchoStats;
22
23
class
EchoHandler
:
public
proxygen::RequestHandler
{
24
public
:
25
explicit
EchoHandler
(
EchoStats
* stats);
26
27
void
onRequest(std::unique_ptr<proxygen::HTTPMessage> headers)
28
noexcept
override
;
29
30
void
onBody(std::unique_ptr<folly::IOBuf> body) noexcept
override
;
31
32
void
onEOM() noexcept
override
;
33
34
void
onUpgrade(
proxygen::UpgradeProtocol
proto) noexcept
override
;
35
36
void
requestComplete() noexcept
override
;
37
38
void
onError(
proxygen::ProxygenError
err) noexcept
override
;
39
40
private
:
41
EchoStats
*
const
stats_{
nullptr
};
42
43
std::unique_ptr<folly::IOBuf>
body_
;
44
};
45
46
}
proxygen::RequestHandler
Definition:
RequestHandler.h:24
EchoService
Definition:
EchoHandler.cpp:19
RequestHandler.h
Memory.h
folly::pushmi::__adl::noexcept
requires E e noexcept(noexcept(s.error(std::move(e))))
Definition:
extension_points.h:40
proxygen::UpgradeProtocol
UpgradeProtocol
Definition:
HTTPConstants.h:61
EchoService::EchoHandler::body_
std::unique_ptr< folly::IOBuf > body_
Definition:
EchoHandler.h:43
EchoService::EchoStats
Definition:
EchoStats.h:19
EchoService::EchoHandler
Definition:
EchoHandler.h:23
proxygen
Definition:
ExMessageHandler.h:14
proxygen::ProxygenError
ProxygenError
Definition:
ProxygenErrorEnum.h:73
proxygen
httpserver
samples
echo
EchoHandler.h
Generated by
1.8.11