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