Re: libcurl - help needed
- Posted by jimcbrown (admin) Oct 27, 2016
- 3415 views
I hope libcurl will be chosen as a replacement of std/socket.e as it covers a broader range of functionalities. Static libraries are also available.
socket.e is a thin wrapper for OS/libc provided socket functionality.
I don't think this is likely to go away anytime soon. But I do think that there is room for both libcurl and socket.e in Eu
I couldn't agree more. One issue with bringing cURL into Euphoria via static library is exposing all of the C functions from the backend. I had proposed this idea to Jim a while ago:
Right, for wrapping Mini-XML, I was thinking I could put all of the function addresses into a table and just peek them all from memory, get the pointer to that table with one machine_func() call, and then wrap the functions with define_c_func()/proc() as if I were wrapping a shared library. That would save me from having to burn through ~70 machine_func() constants in the backend.
That's a really clever idea!
I would imagine that exposing cURL would work the same way.
-Greg
Agreed. We should probably put this on the roadmap. If someone sends us a reasonable patch for this, I'll guarantee that it'll be committed in some form and put into the next release.