[Libwebsockets] lws_is_first_fragment

prelag at yahoo.com prelag at yahoo.com
Thu Aug 6 17:41:32 CEST 2020


Thanks again for all of your help.  As a Java refugee, it's taken some work to put my C big-boy shoes back on.

I am getting a server-side error of invalid fragmentation if I do the following:

msg.first = lws_is_first_fragment(vhd->client_wsi);
////msg.first = lws_is_final_fragment(vhd->client_wsi); <-- that actually makes it work
msg.final = lws_is_final_fragment(vhd->client_wsi);
msg.binary = lws_frame_is_binary(vhd->client_wsi);

first gets set to 0
final gets set to 1

lws_ring_insert(pss->ring, &msg, 1)

the frame sends and server side I get a fragmentation error, when msg.first is set to 0.

What is causing lws_is_first_fragment to not return 1?  There shouldn't be any other messages in the ring buffer that I know of.


Paul R.

More information about the Libwebsockets mailing list