1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00

ss: support raw file

This commit is contained in:
Andy Green 2023-12-10 09:15:18 +00:00
parent 44d9bc08f5
commit 56d07ec06c

View file

@ -120,6 +120,16 @@ secstream_raw(struct lws *wsi, enum lws_callback_reasons reason, void *user,
lwsl_info("%s: RAW_ADOPT\n", __func__);
break;
/* chunks of chunked content, with header removed */
case LWS_CALLBACK_RAW_RX_FILE:
in = p;
f = (int)read(wsi->desc.filefd, p, sizeof(buf) - LWS_PRE);
if (f < 0)
return 0;
len = (unsigned int)f;
/* fallthru */
/* chunks of chunked content, with header removed */
case LWS_CALLBACK_RAW_RX:
if (!h || !h->info.rx)