[Libwebsockets] LWS_CALLBACK_RECEIVE not getting called

"Andy Green (林安廸)" andy at warmcat.com
Fri Jan 25 14:15:26 CET 2013

On 25/01/13 06:58, the mail apparently from Larry Hayes included:
> Hello,
> I am using a slightly older version of libwebsocket:
> libwebsockets-71e53691756fd420c409538c71b010997f06f414
> Maybe this has been fixed in a later version.
> Every thing works OK with User Data less than 1994 bytes
> write mode on the client is set to TEXT.
> SSL connection.
> But on the larger messages the Servers receive callback is  not getting
> called.
> The libwebsocket_service_fd() is returning 0, but no callback is getting
> invoked.
> The rx_packet_length is getting set correctly to 1994
> It does 2 iteration on the libwebsocket_read().
> But the second call has eff_buf.token_len = 1
> While at this point rx_packet_length = 2.
> If there was a fix for this can someone point me to version that fixed it.
> I will just patch what I am running with.
> If not I will try the latest tomorrow.
> Anyone seen this issue?
> The client says the write was successful.

Hm I guess this might be about MAX_BROADCAST_PAYLOAD, set in 
lib/private-libwebsockets.h.  In that version it was set to 2048

If you are indeed using broadcasts to send the data, try cranking this 
up to 4096, which is what it is set to in HEAD.


More information about the Libwebsockets mailing list