[Libwebsockets] libwebsocket_is_final_fragment(wsi) is always returning 1; How to find end of the message?

Andy Green andy at warmcat.com
Wed Oct 29 13:45:30 CET 2014



On 29 October 2014 20:22:32 GMT+08:00, satya gowtham kudupudi <satyagowtham.k at gmail.com> wrote:
>from google chrome I'm sending 34 character string message to the
>libwebsocketserver over websocket. It's being received in 10 character
>fragments and libwebsocket_is_final_fragment(wsi) is returning 1
>always.
>how to find end of the message

Is it actually being sent as a single message?  It sounds like it's being sent as several messages, not several message fragments.

In the browser one javascript write is one message, each one will have the FIN bit set for the final part.  Fragments are done invisibly underneath that by the browser or websocket-aware intermediary.

-Andy

>--
>Gowtham
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list