|
Motion Master 6.0.0-alpha.86
Next-generation motion control software
|
Holds libcurl's process-wide state for the lifetime of one instance. More...
#include <http_client.h>
Public Member Functions | |
| HttpGlobal () | |
| ~HttpGlobal () | |
| HttpGlobal (const HttpGlobal &)=delete | |
| HttpGlobal & | operator= (const HttpGlobal &)=delete |
| HttpGlobal (HttpGlobal &&)=delete | |
| HttpGlobal & | operator= (HttpGlobal &&)=delete |
Holds libcurl's process-wide state for the lifetime of one instance.
libcurl requires one global initialisation before any other thread runs, because it also initialises libraries (OpenSSL) that are unsafe to set up concurrently. So the composition root constructs exactly one of these, before it starts a thread, and every later call shares it. Construct it there and nowhere else: a second instance would repeat the initialisation, and a lazy one inside a request would race the very threads it has to precede.
| mm::net::HttpGlobal::HttpGlobal | ( | ) |
| mm::net::HttpGlobal::~HttpGlobal | ( | ) |
|
delete |
|
delete |
|
delete |
|
delete |