libfilezilla 0.59.0
A cross-platform C++ library for asynchronous and networked applications
Loading...
Searching...
No Matches
client Class Referenceabstract

HTTP client capable of pipelining. More...

#include <libfilezilla/http/client.hpp>

Public Member Functions

 client (event_handler &handler, aio_buffer_pool &buffer_pool, logger_interface &logger, std::string user_agent)
 A buffer pool is optional. If no pool is given, writers cannot be used in responses.
 client (event_handler &handler, logger_interface &logger, std::string user_agent)
bool add_request (shared_request_response const &srr)
void stop (bool keep_alive)
 Stops the client, deletes all requests.
void destroy ()

Protected Member Functions

virtual void on_alive ()
virtual socket_interface * create_socket (native_string const &host, unsigned short port, bool tls)=0
 Called when the client requests a new socket.
virtual void destroy_socket ()=0
 Called when the client no longer needs the socket.

Detailed Description

HTTP client capable of pipelining.

To use this class, two function need to be overriden.

Examples
https.cpp.

Member Function Documentation

◆ destroy()

void destroy ( )

Must be called in the destructor of the derived class

Warning
Must not be invoked from on_alive or the request/response callbacks.
Examples
https.cpp.

◆ on_alive()

virtual void on_alive ( )
inlineprotectedvirtual

Called by the client when there is activity.

Warning
Do not call back into client from on_alive

◆ stop()

void stop ( bool keep_alive)

Stops the client, deletes all requests.

Warning
Must not be invoked from on_alive or the request/response callbacks.

The documentation for this class was generated from the following file: