16 #include <boost/shared_ptr.hpp> 100 typedef std::function<void(
const boost::system::error_code&,
114 typedef std::function<bool(const boost::system::error_code&, const int)>
ConnectHandler;
148 bool defer_thread_start =
false);
237 void asyncSendRequest(
const Url& url,
241 const RequestHandler& request_callback,
244 const ConnectHandler& connect_callback =
246 const HandshakeHandler& handshake_callback =
248 const CloseHandler& close_callback =
256 void checkPermissions();
292 void closeIfOutOfBand(
int socket_fd);
304 uint16_t getThreadPoolSize()
const;
309 uint16_t getThreadCount()
const;
332 boost::shared_ptr<HttpClientImpl> impl_;
HttpClientError(const char *file, size_t line, const char *what)
std::function< bool(const boost::system::error_code &, const int)> ConnectHandler
Optional handler invoked when client connects to the server.
long value_
Timeout value specified.
std::function< void(const boost::system::error_code &, const HttpResponsePtr &, const std::string &)> RequestHandler
Callback type used in call to HttpClient::asyncSendRequest.
HTTP request/response timeout value.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
RequestTimeout(long value)
Constructor.
std::function< void(const int)> CloseHandler
Optional handler invoked when client closes the connection to the server.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
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.
boost::shared_ptr< HttpResponse > HttpResponsePtr
Pointer to the HttpResponse object.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
std::function< bool(const boost::system::error_code &, const int)> HandshakeHandler
Optional handler invoked when client performs the TLS handshake with the server.
boost::shared_ptr< HttpRequest > HttpRequestPtr
Pointer to the HttpRequest object.
A generic error raised by the HttpClient class.
HttpClient implementation.
boost::shared_ptr< HttpClient > HttpClientPtr
Defines a pointer to an HttpClient instance.