RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions
Datacratic::JsonConnectionHandler Struct Reference

#include <json_endpoint.h>

Inheritance diagram for Datacratic::JsonConnectionHandler:
Datacratic::HttpConnectionHandler Datacratic::PassiveConnectionHandler Datacratic::ConnectionHandler Datacratic::AdHocJsonConnectionHandler RTBKIT::HttpAdServerConnectionHandler

List of all members.

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

Detailed Description

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.


Member Function Documentation

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.

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.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator