Example #1
0
        /// <summary>
        /// Obtain status information for a Multi transfer.
        /// </summary>
        /// <returns>
        /// An array of <see cref="MultiInfo"/> objects, one for each
        /// <see cref="Easy"/> object child.
        /// </returns>
        /// <exception cref="System.NullReferenceException">
        /// This is thrown if the native <c>Multi</c> handle wasn't
        /// created successfully.
        /// </exception>
        public MultiInfo[] InfoRead()
        {
            if (m_bGotMultiInfo)
            {
                return(m_multiInfo);
            }
            m_bGotMultiInfo = true;

            int    nMsgs = 0;
            IntPtr pInfo = External.curl_shim_multi_info_read(m_pMulti,
                                                              ref nMsgs);

            if (pInfo != IntPtr.Zero)
            {
                m_multiInfo = new MultiInfo[nMsgs];
                for (int i = 0; i < nMsgs; i++)
                {
                    CURLMSG msg = (CURLMSG)Marshal.ReadInt32(
                        pInfo, i * 12);
                    IntPtr pEasy = Marshal.ReadIntPtr(
                        pInfo, i * 12 + 4);
                    CURLcode code = (CURLcode)Marshal.ReadInt32(
                        pInfo, i * 12 + 8);
                    m_multiInfo[i] = new MultiInfo(msg,
                                                   (Easy)m_htEasy[pEasy], code);
                }
                External.curl_shim_multi_info_free(pInfo);
            }
            return(m_multiInfo);
        }
Example #2
0
		internal MultiInfo(CURLMSG msg, Easy easy, CURLcode result)
		{
            m_msg = msg;
            m_easy = easy;
            m_result = result;
		}
Example #3
0
 public static extern bool MultiInfoRead(
     SafeCurlMultiHandle multiHandle,
     out CURLMSG message,
     out IntPtr easyHandle,
     out CURLcode result);
Example #4
0
 internal MultiInfo(CURLMSG msg, Easy easy, CURLcode result)
 {
     m_msg    = msg;
     m_easy   = easy;
     m_result = result;
 }
Example #5
0
 public static extern bool MultiInfoRead(
     SafeCurlMultiHandle multiHandle,
     out CURLMSG message,
     out IntPtr easyHandle,
     out CURLcode result);