C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Cleanup() публичный Метод

Cleanup unmanaged resources.
public Cleanup ( ) : void
Результат void

DupHandle() публичный Метод

Clone an Easy object.
This is thrown if /// the native CURL* handle wasn't created successfully.
public DupHandle ( ) : Easy
Результат Easy

Easy() публичный Метод

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
Результат System

GetInfo() публичный Метод

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.
Результат CURLcode

GetInfo() публичный Метод

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.
Результат CURLcode

GetInfo() публичный Метод

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.
Результат CURLcode

GetInfo() публичный Метод

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.
Результат CURLcode

GetInfo() публичный Метод

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.
Результат CURLcode

GetInfo() публичный Метод

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.
Результат CURLcode

Perform() публичный Метод

Perform a transfer.
This is thrown if /// the native CURL* handle wasn't created successfully.
public Perform ( ) : CURLcode
Результат CURLcode

Reset() публичный Метод

Reset the internal cURL handle.
This is thrown if /// the native CURL* handle wasn't created successfully.
public Reset ( ) : void
Результат void

SetOpt() публичный Метод

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.
Результат CURLcode

StrError() публичный Метод

Get a string description of an error code.
public StrError ( CURLcode code ) : String
code CURLcode Error code.
Результат String