-
-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an example of sending HTTP response asynchronously? #238
Comments
There's no way, right now, to perform something like this efficiently. The only way, right now, is to use non-blocking sockets, and spin on a call to read(), yielding whenever read() returns -EAGAIN. Work on this has started, though, and it's partially implemented (to allow e.g. corooutines to sleep), but I haven't progressed much beyond what's on the tree right now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my implementation, for every HTTP request received, I need to make an asynchronous HTTP request to a remote server. I need to wait till the response is received from that remote server before I return a status code in my Lwan request handler function.
Instead of returning a status from the handler function, I was expecting to call a function like "lwan_send_response" with content as param once my handler is ready to send the response.
The text was updated successfully, but these errors were encountered: