[Libwebsockets] LWS Send Buffer without PADDING

Andy Green andy at warmcat.com
Thu Apr 7 06:13:34 CEST 2016



On 04/07/2016 11:43 AM, techi eth wrote:
> I was testing libwebsocket server with my test application.I have one
> observation.
>
> During send i have allocated buffer for data length (Not added
> LWS_SEND_PRE & POST PADDING Length) & sent using lws_write.On other side
> connected client have received data what i have sent.
>
> My question is should my client receive right Data ?

For http/1.x, it should be OK.

For ws protocol, it will probably work for send, but lws will write some 
bytes behind the start of your buffer when it sends.  This is likely to 
corrupt something else with unpredictable results.

-Andy

> Regards,
> Techi
>
>
>
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> http://libwebsockets.org/mailman/listinfo/libwebsockets
>



More information about the Libwebsockets mailing list