Websocket Message Fragmentation

TheAutomationCompany
Posts: 1
Joined: Sun Oct 17, 2021 2:55 pm

Websocket Message Fragmentation

Postby TheAutomationCompany » Tue Oct 19, 2021 7:37 pm

Hi everyone

I'm actual developing an application with an ESP and websocket protocol. I use the standard library "esp_websocket_client.h" for this case. Everything works really fine until I came to the point I have to split up messages in multiple fragments. This is a standard procedure according to the websocket RFC6455.

Questions I can't answer till now:

1. Is there a way the library is doing this for me? Somewhere in the library documentation is written, that the library returns multiple callbacks for too large messages. This is the case when a message exceed 126 bytes. I can't increase this number. But in this case the second callback returns just garbage. Wrong opcode etc.
2. I would like to do this on my own. But to do this, I have to read out the FIN Bit for a message. Does anyone know, where I can read out this bit?

Thank you very much for your help

Who is online

Users browsing this forum: DrMickeyLauer and 72 guests