|
Android-cuttlefish cvd tool
|
#include <http_client_pool.h>


Public Types | |
| using | CreateClient = std::function< Result< std::unique_ptr< HttpClient > >()> |
Public Types inherited from cuttlefish::HttpClient | |
| typedef std::function< bool(char *, size_t)> | BoolDataCallback |
| typedef std::function< Result< void >(char *, size_t)> | ResultDataCallback |
Public Member Functions | |
| HttpClientPool (CreateClient create, size_t max_clients=0) | |
| Result< HttpResponse< void > > | DownloadToCallback (HttpRequest, ResultDataCallback callback) override |
Public Member Functions inherited from cuttlefish::HttpClient | |
| virtual | ~HttpClient () |
| virtual Result< HttpResponse< void > > | DownloadToCallback (HttpRequest, ResultDataCallback callback)=0 |
Private Attributes | |
| const CreateClient | create_ |
| const size_t | max_clients_ |
| std::condition_variable | condition_variable_ |
| std::mutex | mutex_ |
| std::stack< std::unique_ptr< HttpClient > > | free_clients_ |
| size_t | clients_in_use_ |
| using cuttlefish::HttpClientPool::CreateClient = std::function<Result<std::unique_ptr<HttpClient> >()> |
|
explicit |
|
overridevirtual |
Implements cuttlefish::HttpClient.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |