RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <json_endpoint.h>
Public Member Functions | |
virtual void | handleHttpHeader (const HttpHeader &header) |
virtual void | handleHttpPayload (const HttpHeader &header, const std::string &payload) |
virtual void | handleHttpChunk (const HttpHeader &header, const std::string &chunkHeader, const std::string &chunk) |
virtual void | handleJson (const HttpHeader &header, const Json::Value &json, const std::string &jsonStr)=0 |
A connection handler that deals with JSON connections.
This will handle parsing the header, but will forward the data off to another slave handler. It's the HTTP Endpoint's responsibility to generate a slave handler once a header is received.
Definition at line 29 of file json_endpoint.h.
void Datacratic::JsonConnectionHandler::handleHttpChunk | ( | const HttpHeader & | header, |
const std::string & | chunkHeader, | ||
const std::string & | chunk | ||
) | [virtual] |
Allow it to work with chunked headers too
Reimplemented from Datacratic::HttpConnectionHandler.
Definition at line 72 of file json_endpoint.cc.
void Datacratic::JsonConnectionHandler::handleHttpHeader | ( | const HttpHeader & | header | ) | [virtual] |
Called when the HTTP header comes through. Default will pass it back to the endpoint to do something with it.
Reimplemented from Datacratic::HttpConnectionHandler.
Definition at line 30 of file json_endpoint.cc.
void Datacratic::JsonConnectionHandler::handleHttpPayload | ( | const HttpHeader & | header, |
const std::string & | payload | ||
) | [virtual] |
Called once the entire payload has come through. Default will throw. Will be called multiple times for chunked encoding.
Reimplemented from Datacratic::HttpConnectionHandler.
Definition at line 42 of file json_endpoint.cc.
virtual void Datacratic::JsonConnectionHandler::handleJson | ( | const HttpHeader & | header, |
const Json::Value & | json, | ||
const std::string & | jsonStr | ||
) | [pure virtual] |
Handler that deals with the actual JSON.
Implemented in Datacratic::AdHocJsonConnectionHandler, and RTBKIT::HttpAdServerConnectionHandler.