C# Class SeasideResearch.LibCurlNet.Easy

Implements the curl_easy_xxx API.
This is the most important class in libcurl.NET. It wraps a CURL* handle and provides delegates through which callbacks (such as CURLOPT_WRITEFUNCTION and CURLOPT_READFUNCTION) are implemented.
Datei anzeigen Open project: bricel/DrutNet Class Usage Examples

Public Methods

Method Description
Cleanup ( ) : void

Cleanup unmanaged resources.

DupHandle ( ) : Easy

Clone an Easy object.

Easy ( ) : System

Constructor

GetInfo ( CURLINFO info, System.DateTime &dt ) : CURLcode

Extract DateTime information from an Easy object.

GetInfo ( CURLINFO info, Object &objInfo ) : CURLcode

Extract information from a cURL handle.

GetInfo ( CURLINFO info, SeasideResearch.LibCurlNet.Slist &slist ) : CURLcode

Extract Slist information from an Easy object.

GetInfo ( CURLINFO info, double &dblVal ) : CURLcode

Extract int information from an Easy object.

GetInfo ( CURLINFO info, int &intVal ) : CURLcode

Extract int information from an Easy object.

GetInfo ( CURLINFO info, string &strVal ) : CURLcode

Extract string information from an Easy object.

Perform ( ) : CURLcode

Perform a transfer.

Reset ( ) : void

Reset the internal cURL handle.

SetOpt ( CURLoption option, Object parameter ) : CURLcode

Set options for this object. See the EasyGet sample for basic usage.

StrError ( CURLcode code ) : String

Get a string description of an error code.

Private Methods

Method Description
DebugDelegate ( CURLINFOTYPE infoType, IntPtr msgBuf, int msgBufSize, IntPtr parm ) : int
Dispose ( bool disposing ) : void
Easy ( Easy from ) : System
EnsureHandle ( ) : void
GetHandle ( ) : IntPtr
HeaderDelegate ( IntPtr buf, int sz, int nmemb, IntPtr parm ) : int
InstallDelegates ( ) : void
IoctlDelegate ( CURLIOCMD cmd, IntPtr parm ) : CURLIOERR
ProgressDelegate ( IntPtr parm, double dlTotal, double dlNow, double ulTotal, double ulNow ) : int
ReadDelegate ( IntPtr buf, int sz, int nmemb, IntPtr parm ) : int
SSLCtxDelegate ( IntPtr ctx, IntPtr parm ) : int
WriteDelegate ( IntPtr buf, int sz, int nmemb, IntPtr parm ) : int

Method Details

Cleanup() public method

Cleanup unmanaged resources.
public Cleanup ( ) : void
return void

DupHandle() public method

Clone an Easy object.
This is thrown if /// the native CURL* handle wasn't created successfully.
public DupHandle ( ) : Easy
return Easy

Easy() public method

Constructor
This is thrown /// if hasn't bee properly initialized. This is thrown if /// the native CURL* handle wasn't created successfully.
public Easy ( ) : System
return System

GetInfo() public method

Extract DateTime information from an Easy object.
This is thrown if /// the native CURL* handle wasn't created successfully.
public GetInfo ( CURLINFO info, System.DateTime &dt ) : CURLcode
info CURLINFO One of the values in the /// enumeration. In this case, it must /// specifically be . ///
dt System.DateTime Reference to a DateTime value.
return CURLcode

GetInfo() public method

Extract information from a cURL handle.
This is thrown if /// the native CURL* handle wasn't created successfully.
public GetInfo ( CURLINFO info, Object &objInfo ) : CURLcode
info CURLINFO One of the values in the /// enumeration.
objInfo Object Reference to an object into which the /// value specified by info is written.
return CURLcode

GetInfo() public method

Extract Slist information from an Easy object.
This is thrown if /// the native CURL* handle wasn't created successfully.
public GetInfo ( CURLINFO info, SeasideResearch.LibCurlNet.Slist &slist ) : CURLcode
info CURLINFO One of the values in the /// enumeration. In this case, it must /// specifically be one of the members that obtains an Slist. ///
slist SeasideResearch.LibCurlNet.Slist Reference to an Slist value.
return CURLcode

GetInfo() public method

Extract int information from an Easy object.
This is thrown if /// the native CURL* handle wasn't created successfully.
public GetInfo ( CURLINFO info, double &dblVal ) : CURLcode
info CURLINFO One of the values in the /// enumeration. In this case, it must /// specifically be one of the members that obtains a double. ///
dblVal double Reference to an double value.
return CURLcode

GetInfo() public method

Extract int information from an Easy object.
This is thrown if /// the native CURL* handle wasn't created successfully.
public GetInfo ( CURLINFO info, int &intVal ) : CURLcode
info CURLINFO One of the values in the /// enumeration. In this case, it must /// specifically be one of the members that obtains an int. ///
intVal int Reference to an int value.
return CURLcode

GetInfo() public method

Extract string information from an Easy object.
This is thrown if /// the native CURL* handle wasn't created successfully.
public GetInfo ( CURLINFO info, string &strVal ) : CURLcode
info CURLINFO One of the values in the /// enumeration. In this case, it must /// specifically be one of the members that obtains a string. ///
strVal string Reference to an string value.
return CURLcode

Perform() public method

Perform a transfer.
This is thrown if /// the native CURL* handle wasn't created successfully.
public Perform ( ) : CURLcode
return CURLcode

Reset() public method

Reset the internal cURL handle.
This is thrown if /// the native CURL* handle wasn't created successfully.
public Reset ( ) : void
return void

SetOpt() public method

Set options for this object. See the EasyGet sample for basic usage.
This is thrown if /// the native CURL* handle wasn't created successfully.
public SetOpt ( CURLoption option, Object parameter ) : CURLcode
option CURLoption This should be a valid .
parameter Object This should be a parameter of a varying /// type based on the value of the option parameter.
return CURLcode

StrError() public method

Get a string description of an error code.
public StrError ( CURLcode code ) : String
code CURLcode Error code.
return String