Пример #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <exception cref="System.InvalidOperationException">This is thrown
 /// if <see cref="Curl"/> hasn't bee properly initialized.</exception>
 /// <exception cref="System.NullReferenceException">This is thrown if
 /// the native <c>CURL*</c> handle wasn't created successfully.</exception>
 public Easy()
 {
     Curl.EnsureCurl();
     m_pCURL = External.curl_easy_init();
     EnsureHandle();
     External.curl_easy_setopt(m_pCURL, CURLoption.CURLOPT_NOPROGRESS,
                               IntPtr.Zero);
     m_pMyStrings     = External.curl_shim_alloc_strings();
     m_pfWrite        = null;
     m_privateData    = null;
     m_writeData      = null;
     m_pfRead         = null;
     m_readData       = null;
     m_pfProgress     = null;
     m_progressData   = null;
     m_pfDebug        = null;
     m_debugData      = null;
     m_pfHeader       = null;
     m_headerData     = null;
     m_pfSSLContext   = null;
     m_sslContextData = null;
     m_pfIoctl        = null;
     m_ioctlData      = null;
     InstallDelegates();
 }
Пример #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <exception cref="System.InvalidOperationException">This is thrown
 /// if <see cref="Curl"/> hasn't bee properly initialized.</exception>
 public MultiPartForm()
 {
     Curl.EnsureCurl();
     m_pItems    = new IntPtr[2];
     m_pItems[0] = IntPtr.Zero;
     m_pItems[1] = IntPtr.Zero;
 }
Пример #3
0
        private External.CURLSH_UNLOCK_DELEGATE m_pDelUnlock; // unlock delegate

        /// <summary>
        /// Constructor
        /// </summary>
        /// <exception cref="System.InvalidOperationException">This is thrown
        /// if <see cref="Curl"/> hasn't bee properly initialized.</exception>
        /// <exception cref="System.NullReferenceException">This is thrown if
        /// the native <c>share</c> handle wasn't created successfully.</exception>
        public Share()
        {
            Curl.EnsureCurl();
            m_pShare = External.curl_share_init();
            EnsureHandle();
            m_pfLock   = null;
            m_pfUnlock = null;
            m_userData = null;
            InstallDelegates();
        }
Пример #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <exception cref="System.InvalidOperationException">This is thrown
 /// if <see cref="Curl"/> hasn't bee properly initialized.</exception>
 /// <exception cref="System.NullReferenceException">
 /// This is thrown if the native <c>Multi</c> handle wasn't
 /// created successfully.
 /// </exception>
 public Multi()
 {
     Curl.EnsureCurl();
     m_pMulti = External.curl_multi_init();
     EnsureHandle();
     m_fdSets        = IntPtr.Zero;
     m_maxFD         = 0;
     m_fdSets        = External.curl_shim_alloc_fd_sets();
     m_multiInfo     = null;
     m_bGotMultiInfo = false;
     m_htEasy        = new Hashtable();
 }
Пример #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <exception cref="System.InvalidOperationException">This is thrown
 /// if <see cref="Curl"/> hasn't bee properly initialized.</exception>
 public Slist()
 {
     Curl.EnsureCurl();
     m_pStringList = IntPtr.Zero;
 }