Replies: 1 comment
-
I can't help with the C++ but from what I understand you only want to use tryEnd() if you are streaming data from some source, if you already have all your data ready to go in memory like a big JSON string you should just call res.end() with the string, it will send the data out in chunks for you. onAborted gets called if connection closes before finishing request, nothing wrong with that, happens sometimes like user navigates to different page etc |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a GET handler which returns jSon strings which vary in size but can reach up to about 250kB. When I use HttpResponse->end() the GET request usually works but in some rare cases the onAborted() handler gets called, so from my understanding I should use tryEnd() and onWritable() instead. This is my code so far:
The onWritable handler seems not to be called. I read the JS video streamer code but maybe I didn't adapt it correctly to c++ and my usecase. Any tips?
Beta Was this translation helpful? Give feedback.
All reactions