masroore / CurlSharp

CurlSharp - .Net binding and object-oriented wrapper for libcurl.
BSD 3-Clause "New" or "Revised" License
182 stars 71 forks source link

Request: Example using multi.InfoRead #9

Closed pjf closed 9 years ago

pjf commented 9 years ago

The documentation on multi transfers indicates that curl_multi_info_read should be called to retrieve the status of completed transfers.

I cannot for the life of me get this to work (my thread appears to hang), so I'd love an example that uses it.

Many, many thanks!

~ Paul

masroore commented 9 years ago

@pjf Unfortunately, the InfoRead() [code] method only works on 32-bit Windows. It relies on the libcurlshim helper DLL. When you're compiling the CurlSharp assembly, please assign USE_LIBCURLSHIM as the conditional compilation symbol at the project properties page. Also don't forget to target all your projects for the x86 platform. You'll find libcurlshim.dll​in libs\i386 folder.

My C/C++ skills are a bit rusty. It'd be excellent if anyone could port the libcurlshim library to WIN64 and mono OSX/LINUX​.

pjf commented 9 years ago

Aha! That would explain things. I'm using curlsharp on Mac and Linux platforms.

I've luckily found a work-around (spawning a thread for each CurlEasy), which I'm testing now.

What are your views on having InfoRead() throw an exception if we've been compiled without the shim? That means we fail quickly and obviously. (I'm happy to submit the PR if you like, just pre-clearing that it would be merged if I do.)

Thanks again for an awesome library!

~ Paul

masroore commented 9 years ago

@pjf A PR would be great! Thanks!