babelouest / ulfius

Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
https://babelouest.github.io/ulfius
GNU Lesser General Public License v2.1
1.07k stars 183 forks source link

data_available fix for secure websockets #166

Closed wouher closed 4 years ago

wouher commented 4 years ago

In case of secure websocket communication, use a combination of gnutls_record_check_pending() and poll() to determine if data is ready.

I encountered cases where my client waited infinitely on poll which kept returning 0, while data could be read (and gnutls_record_check_pending correctly reported this).

babelouest commented 4 years ago

Thanks for the fix @wouher !