[Libwebsockets] lws_is_first_fragment() not working?

Gregory Kip gkip at permusoft.com
Fri May 21 22:27:01 CEST 2021


Hi Andy,

I have a client running v2.something. I’m not seeing any packets come in for which lws_is_first_fragment() returns a true/1. And all packets seem to be indicated as lws_is_final_fragment() == true/1.

If the entire websocket packet is contained in the char *in of a given LWS_CALLBACK_CLIENT_RECEIVE, shouldn’t both first and final be indicated? Or perhaps I’m doing something wrong…

      case LWS_CALLBACK_CLIENT_RECEIVE: {
         int isStart = lws_is_first_fragment(wsi) ? 1 : 0;
         int isEnd = lws_is_final_fragment(wsi) ? 1 : 0;
         printf(“%d/%d\n", isStart, isEnd);
      }

I see

0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1

forever.

Any advice?

Thanks,

Gregory Kip
Permusoft Corporation
gkip at permusoft.com
(303) 588-6051

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20210521/600b147a/attachment.htm>


More information about the Libwebsockets mailing list