CurlMulti Class Reference

(Internal) CurlMulti is a class that provides an interface to the libcurl "multi" interface. More...

#include <librets/CurlMulti.h>

List of all members.

Public Member Functions

 CurlMulti ()
 ~CurlMulti ()
void AddEasy (CurlEasyPtr curlEasy)
 Add a libcurl "easy" handle to the multi handle and place it on the in use vector.
CurlEasyPtr EasyFactory ()
 Returns a pointer to a CurlEasy object that can be used for an http request.
void FreeEasy (CurlEasyPtr curlEasy)
 Add the "easy" handle back to the available queue.
curl_slist * GetCookieSlist ()
 Returns the curl cookie slist.
CURLM * GetMultiHandle ()
 Returns the libcurl handle used by this object.
int GetPriorRunning ()
 Returns the number of requests that were running at the beginning of this iteration.
int GetStillRunning ()
 Returns the number of reqeusts still running.
void Perform ()
 Perform a multi operation.
void RemoveEasy (CurlEasyPtr curlEasy)
 Remove the provided libcurl "easy" handle from this class and libcurl.
bool StillRunning ()
 Determine whether or not the current http request is still in progress with libcurl.


Detailed Description

(Internal) CurlMulti is a class that provides an interface to the libcurl "multi" interface.

It is used in support of the "streaming" enhancement to libRETS.


Constructor & Destructor Documentation

CurlMulti (  ) 

~CurlMulti (  ) 


Member Function Documentation

void AddEasy ( CurlEasyPtr  curlEasy  ) 

Add a libcurl "easy" handle to the multi handle and place it on the in use vector.

Parameters:
curlEasy A pointer to a CurlEasy object.

CurlEasyPtr EasyFactory (  ) 

Returns a pointer to a CurlEasy object that can be used for an http request.

Returns:
Pointer to CurlEasy object.

void FreeEasy ( CurlEasyPtr  curlEasy  ) 

Add the "easy" handle back to the available queue.

Parameters:
curlEasy A pointer to a CurlEasy object.

curl_slist* GetCookieSlist (  ) 

Returns the curl cookie slist.

Returns:
A pointer to a curl_slist structure.

CURLM* GetMultiHandle (  ) 

Returns the libcurl handle used by this object.

Returns:
Pointer to CURLM (refer to the libcurl documentation).

int GetPriorRunning (  ) 

Returns the number of requests that were running at the beginning of this iteration.

Returns:
An integer containing the number of requests prior to this request.

int GetStillRunning (  ) 

Returns the number of reqeusts still running.

Returns:
An integer representing the number of requests in progress.

void Perform (  ) 

Perform a multi operation.

The caller will need to handle the determination as to whether enough data has arrived and if not, call Perform() again in a loop.

Exceptions:
RetsException 

void RemoveEasy ( CurlEasyPtr  curlEasy  ) 

Remove the provided libcurl "easy" handle from this class and libcurl.

Parameters:
curlEasy A reference to the CurlEasy object to remove.

bool StillRunning (  ) 

Determine whether or not the current http request is still in progress with libcurl.

Returns:
A boolean that if TRUE, indicates that the transaction is still in progress.


Generated by  doxygen