Skip to content

Conversation

@IHni3
Copy link

@IHni3 IHni3 commented Apr 20, 2022

Like described in #1040. I added isOpened() and isClosed(), so it is possible to know when the client terminates the connection. I personaly use it for SSE.

@dennisjenkins75
Copy link
Collaborator

I would really prefer if pistache did not use select() to poll a descriptor, and instead used the HUP event from epoll() to detect when the http client hangs up.

// 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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed?

@fleon-psi
Copy link

Hi, Option to support SSEs seems to be very useful for my project.
I wanted to ask about status of this fix? Is there something I could do to help in going forward with this one?
Thanks!

@kiplingw
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants