Functions for Server Sent Events added - #1054
Open
IHni3 wants to merge 12 commits into
Open
Conversation
Merged
Collaborator
|
I would really prefer if pistache did not use |
Tachi107
referenced
this pull request
Apr 21, 2022
…nse-stream Bugfix/fix connection check on response stream
Tachi107
reviewed
Sep 2, 2022
| // https://stackoverflow.com/questions/6624667/can-i-use-libcurls-curlopt-writefunction-with-a-c11-lambda-expression#14720398 | ||
| auto curl_callback = +[](void* ptr, size_t size, size_t nmemb, | ||
| typedef size_t (*CURL_WRITEFUNCTION_PTR)(void*, size_t, size_t, void*); | ||
| auto curl_callback = [](void* ptr, size_t size, size_t nmemb, |
|
Hi, Option to support SSEs seems to be very useful for my project. |
Member
|
Thanks @fleon-psi for checking in. This PR still needs some more. It needs to at least be rebased and a unit test added. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Like described in #1040. I added
isOpened()andisClosed(),so it is possible to know when the client terminates the connection. I personaly use it for SSE.