proxygen
PushService Namespace Reference

Classes

class  PushRequestHandler
 
class  PushStats
 

Functions

const std::string kPushFileName ("proxygen/httpserver/samples/push/pusheen.txt")
 
std::string createLargeBody ()
 
std::string generateUrl (const HTTPMessage &message, const char *path)
 

Variables

std::string gPushBody
 

Function Documentation

std::string PushService::createLargeBody ( )

Definition at line 26 of file PushRequestHandler.cpp.

References data, gPushBody, and string.

Referenced by PushService::PushRequestHandler::onRequest().

26  {
28  while(data.size() < 1000*1000) {
29  data += gPushBody;
30  }
31  return data;
32 }
std::string gPushBody
const char * string
Definition: Conv.cpp:212
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
std::string PushService::generateUrl ( const HTTPMessage message,
const char *  path 
)

Definition at line 34 of file PushRequestHandler.cpp.

References proxygen::HTTPMessage::createUrl(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTPHeaders::getSingleOrEmpty(), proxygen::HTTP_HEADER_HOST, and proxygen::HTTPMessage::isSecure().

Referenced by PushService::PushRequestHandler::onRequest().

34  {
35  return HTTPMessage::createUrl(
36  message.isSecure() ? "https" : "http",
37  message.getHeaders().getSingleOrEmpty(HTTP_HEADER_HOST), path, "", "");
38 }
HTTPHeaders & getHeaders()
Definition: HTTPMessage.h:273
const std::string & getSingleOrEmpty(const T &nameOrCode) const
Definition: HTTPHeaders.h:420
bool isSecure() const
Definition: HTTPMessage.h:535
const std::string PushService::kPushFileName ( "proxygen/httpserver/samples/push/pusheen.txt"  )

Variable Documentation

std::string PushService::gPushBody