FFI, cURL and function callback

  • From: pingon begand <sbronfion@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 24 Mar 2013 13:32:24 +0100

Hello everyone !

I have a lot of codes that depends on luasocket, however it looks to be
unmaintained anymore. I am thinking to switch to the cURL library thanks to
the FFI LuaJIT is offering.

I want to use the cURL library in order to retrieve some website contents
as strings. However one need to have a function callback in order to do
this. Is this possible to achieve such things with plain LuaJIT and FFI?

Here is a C example :
http://stackoverflow.com/questions/2329571/c-libcurl-get-output-into-a-string

Thanks a lot for your help !

Other related posts: