RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <http_named_endpoint.h>
Classes | |
struct | RestConnectionHandler |
Public Types | |
typedef std::function< void(RestConnectionHandler *connection, const HttpHeader &header, const std::string &payload) | OnRequest ) |
Public Member Functions | |
void | init (std::shared_ptr< ConfigurationService > config, const std::string &endpointName) |
std::string | bindTcpAddress (const std::string &address) |
std::string | bindTcpFixed (std::string host, int port) |
std::string | bindTcp (PortRange const &portRange, std::string host="") |
virtual std::shared_ptr < ConnectionHandler > | makeNewHandler () |
Public Attributes | |
OnRequest | onRequest |
A message loop-compatible endpoint for http connections.
Definition at line 24 of file http_named_endpoint.h.
std::string Datacratic::HttpNamedEndpoint::bindTcp | ( | PortRange const & | portRange, |
std::string | host = "" |
||
) | [inline] |
Bind into a tcp port. If the preferred port is not available, it will scan until it finds one that is.
Returns the uri to connect to.
Definition at line 90 of file http_named_endpoint.h.
std::string Datacratic::HttpNamedEndpoint::bindTcpAddress | ( | const std::string & | address | ) | [inline] |
Bid into a given address. Address is host:port.
If no port is given (and no colon), than use any port number. If port is a number and then "+", then scan for any port higher than the given number. If host is empty or "*", then use all interfaces.
Definition at line 45 of file http_named_endpoint.h.
std::string Datacratic::HttpNamedEndpoint::bindTcpFixed | ( | std::string | host, |
int | port | ||
) | [inline] |
Bind into a specific tcp port. If the port is not available, it will throw an exception.
Returns the uri to connect to.
Definition at line 79 of file http_named_endpoint.h.
void Datacratic::HttpNamedEndpoint::init | ( | std::shared_ptr< ConfigurationService > | config, |
const std::string & | endpointName | ||
) | [inline] |
The endpoint exists. Publish that to anyone who may care.
Reimplemented from Datacratic::NamedEndpoint.
Definition at line 31 of file http_named_endpoint.h.