masroore / CurlSharp

CurlSharp - .Net binding and object-oriented wrapper for libcurl.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request: Example using multi.InfoRead

pjf opened this issue · comments

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

@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​.

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

@pjf A PR would be great! Thanks!