/// <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); }
internal MultiInfo(CURLMSG msg, Easy easy, CURLcode result) { m_msg = msg; m_easy = easy; m_result = result; }
public static extern bool MultiInfoRead( SafeCurlMultiHandle multiHandle, out CURLMSG message, out IntPtr easyHandle, out CURLcode result);