示例#1
0
 /// <summary>
 /// Perform a transfer.
 /// </summary>
 /// <exception cref="System.NullReferenceException">This is thrown if
 /// the native <c>CURL*</c> handle wasn't created successfully.</exception>
 /// <returns>The <see cref="CURLcode"/> obtained from the internal
 /// call to <c>curl_easy_perform()</c>.
 /// </returns>
 public CURLcode Perform()
 {
     EnsureHandle();
     try
     {
         return((CURLcode)External.curl_easy_perform(m_pCURL));
     }
     catch (Exception e)
     {
         //  this.Cleanup(); //check error with , memory corupted here
         //this.SetOpt(CURLoption.CURLOPT_URL, _URL);
         // return (CURLcode)External.curl_easy_perform(m_pCURL);
         Exception myEx = new Exception("Unable to connect to curl", e);
         myEx.Data.Add("Code", 1);
         throw myEx;
     }
 }
示例#2
0
 /// <summary>
 /// Perform a transfer.
 /// </summary>
 /// <exception cref="System.NullReferenceException">This is thrown if
 /// the native <c>CURL*</c> handle wasn't created successfully.</exception>
 /// <returns>The <see cref="CURLcode"/> obtained from the internal
 /// call to <c>curl_easy_perform()</c>.
 /// </returns>
 public CURLcode Perform()
 {
     EnsureHandle();
     return((CURLcode)External.curl_easy_perform(m_pCURL));
 }