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.
Afficher le fichier Open project: bricel/DrutNet Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Cleanup unmanaged resources.
public Cleanup ( ) : void
Résultat void

DupHandle() public méthode

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

Easy() public méthode

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
Résultat System

GetInfo() public méthode

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.
Résultat CURLcode

GetInfo() public méthode

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.
Résultat CURLcode

GetInfo() public méthode

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.
Résultat CURLcode

GetInfo() public méthode

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.
Résultat CURLcode

GetInfo() public méthode

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.
Résultat CURLcode

GetInfo() public méthode

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.
Résultat CURLcode

Perform() public méthode

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

Reset() public méthode

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

SetOpt() public méthode

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.
Résultat CURLcode

StrError() public méthode

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