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:
parent
44d9bc08f5
commit
56d07ec06c
1 changed files with 10 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue