Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
mm::net::HttpGlobal Class Reference

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
 
HttpGlobaloperator= (const HttpGlobal &)=delete
 
 HttpGlobal (HttpGlobal &&)=delete
 
HttpGlobaloperator= (HttpGlobal &&)=delete
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ HttpGlobal() [1/3]

mm::net::HttpGlobal::HttpGlobal ( )

◆ ~HttpGlobal()

mm::net::HttpGlobal::~HttpGlobal ( )

◆ HttpGlobal() [2/3]

mm::net::HttpGlobal::HttpGlobal ( const HttpGlobal )
delete

◆ HttpGlobal() [3/3]

mm::net::HttpGlobal::HttpGlobal ( HttpGlobal &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

HttpGlobal & mm::net::HttpGlobal::operator= ( const HttpGlobal )
delete

◆ operator=() [2/2]

HttpGlobal & mm::net::HttpGlobal::operator= ( HttpGlobal &&  )
delete

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