[Libwebsockets] Receiving multi-frame data as a libwebsocket server

Drew Noakes drew at drewnoakes.com
Mon Jun 16 22:15:23 CEST 2014


Hi,

I'm using libwebsockets as a server, and a browser at a client.
Occasionally the client needs to send data to the server.

Recently the size of this data jumped above 4096 bytes, and I'm now seeing
fragmentation on the server side.

How can I detect whether data received in LWS_CALLBACK_RECEIVE should be
considered a continuation of data received previously? I tried
calling libwebsocket_is_final_fragment(wsi) but this always returns true.

I also tried observing the data in WireShark to see if Chrome's doing the
right thing, but the data appears to be hashed/obfuscated somehow.

It didn't appear to me as though the sample applications have this
functionality.

Thanks,

Drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20140616/e91bf99b/attachment.html>


More information about the Libwebsockets mailing list