7#ifndef HTTP_LISTENER_IMPL_H
8#define HTTP_LISTENER_IMPL_H
16#include <boost/scoped_ptr.hpp>
49 const unsigned short server_port,
52 const long request_timeout,
53 const long idle_timeout);
The IOAddress class represents an IP addresses (version agnostic)
The TCPEndpoint class is a concrete derived class of IOEndpoint that represents an endpoint of a TCP ...
Pool of active HTTP connections.
Implementation of the HttpListener.
HttpConnectionPool connections_
Pool of active connections.
long request_timeout_
Timeout for HTTP Request Timeout desired.
void start()
Starts accepting new connections.
boost::scoped_ptr< asiolink::TCPEndpoint > endpoint_
Pointer to the endpoint representing IP address and port on which the service is running.
long idle_timeout_
Timeout after which idle persistent connection is closed by the server.
HttpResponseCreatorFactoryPtr creator_factory_
Pointer to the HttpResponseCreatorFactory.
asiolink::IOServicePtr io_service_
Pointer to the IO service.
const asiolink::TCPEndpoint & getEndpoint() const
Returns reference to the current listener endpoint.
void accept()
Creates HttpConnection instance and adds it to the pool of active connections.
HttpAcceptorPtr acceptor_
Acceptor instance.
virtual ~HttpListenerImpl()
Virtual destructor.
asiolink::TlsContextPtr tls_context_
TLS context.
virtual HttpConnectionPtr createConnection(const HttpResponseCreatorPtr &response_creator, const HttpAcceptorCallback &callback)
Creates an instance of the HttpConnection.
void acceptHandler(const boost::system::error_code &ec)
Callback invoked when the new connection is accepted.
void stop()
Stops all active connections and shuts down the service.
boost::shared_ptr< TlsContext > TlsContextPtr
The type of shared pointers to TlsContext objects.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
boost::shared_ptr< HttpResponseCreator > HttpResponseCreatorPtr
Pointer to the HttpResponseCreator object.
boost::shared_ptr< HttpResponseCreatorFactory > HttpResponseCreatorFactoryPtr
Pointer to the HttpResponseCreatorFactory.
std::function< void(const boost::system::error_code &)> HttpAcceptorCallback
Type of the callback for the TCP acceptor used in this library.
boost::shared_ptr< HttpConnection > HttpConnectionPtr
Pointer to the HttpConnection.
boost::shared_ptr< HttpAcceptor > HttpAcceptorPtr
Type of shared pointer to TCP acceptors.
Defines the logger used by the top-level component of kea-lfc.