Now that LÖVR has support for asynchronous functions with the lovr.task module, it would be nice if lovr-http could integrate with lovr's task system somehow to allow for async requests.
I think all the backends support it. Windows has IOCP, curl has a "multi" interface, the macOS one seems like it's already async, and Java probably has something.
Some options I'm thinking about:
- Include lovr's headers in this library and use
luax_yieldpoll to turn http.request into an async function. Maybe only do this when compiling for lovr.
- Don't make it an async function, but add some kind of
Request object that tracks a request. This is a little less user friendly, but isn't lovr specific.
- Fold this library into LÖVR?
lovr.net module?
Now that LÖVR has support for asynchronous functions with the
lovr.taskmodule, it would be nice if lovr-http could integrate with lovr's task system somehow to allow for async requests.I think all the backends support it. Windows has IOCP, curl has a "multi" interface, the macOS one seems like it's already async, and Java probably has something.
Some options I'm thinking about:
luax_yieldpollto turnhttp.requestinto an async function. Maybe only do this when compiling for lovr.Requestobject that tracks a request. This is a little less user friendly, but isn't lovr specific.lovr.netmodule?