MCPcopy Create free account
hub / github.com/JosephP91/curlcpp / curl_multi

Class curl_multi

include/curl_multi.h:166–333  ·  view source on GitHub ↗

* As libcurl documentation says, the multi interface offers several abilities that * the easy interface doesn't. They are mainly: * 1. Enable a "pull" interface. The application that uses libcurl decides where and * when to ask libcurl to get/send data. * 2. Enable multiple simultaneous transfers in the same thread without making it * complicated for the application.

Source from the content-addressed store, hash-verified

164 * file descriptors simultaneous easily.
165 */
166 class curl_multi : public curl_interface<CURLMcode> {
167 public:
168 /**
169 * The multi interface gives users the opportunity to get information about
170 * transfers. This information is wrapped in the following class. In this
171 * way users can access this information in an easy and efficient way.
172 * This class is nested because these messages are only sent when using the
173 * multi interface.
174 */
175 class curl_message {
176 public:
177 /**
178 * The attributes will be initialized with constructors parameters. With
179 * this constructor we provide a fast way to build this kind of object.
180 */
181 explicit curl_message(const CURLMsg *, const curl_easy *);
182 /**
183 * Inline getter method used to return
184 * the message for a single handler.
185 */
186 CURLMSG get_message() const;
187 /**
188 * Inline getter method used to return
189 * the code for a single handler.
190 */
191 CURLcode get_code() const;
192 /**
193 * Inline getter method used to return
194 * other data.
195 */
196 const void *get_other() const;
197 /**
198 * Returns the handler to the easy interface.
199 */
200 const curl_easy *get_handler() const;
201 private:
202 const CURLMSG message;
203 const void *whatever;
204 const CURLcode code;
205 const curl_easy *handler;
206 };
207
208 /**
209 * Simple default constructor. It is used to give a
210 * default value to all the attributes and provide a
211 * fast way to create an object of this type. It also
212 * initializes the curl environment with the default
213 * values.
214 */
215 curl_multi();
216 /**
217 * Overloaded constructor. Gives users the opportunity
218 * to initialize the entire curl environment using custom
219 * options.
220 */
221 explicit curl_multi(long globalOptions);
222 /**
223 * Move constructor which moves internal data to another object.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected