Giter Site home page Giter Site logo

Comments (4)

Links2004 avatar Links2004 commented on June 29, 2024

this is the defined limit, you can increase it, but its there for a reason ;)

#define WEBSOCKETS_MAX_DATA_SIZE (15 * 1024)

if you send a loot of big frames like this you can easily run out of RAM / heap.

for sending big chunks of data its better to use the fragmentation.
any typical TCP/IP network and the ESP network stack can not handle 16k frames (mtu) any way.

which as a result mean that you dont lose anything if you do the fragmentation on the "date input" side.

from arduinowebsockets.

blackcoffeexbt avatar blackcoffeexbt commented on June 29, 2024

Thanks for the reply. By fragmentation, do you mean splitting the payload into multiple messages on the sender side or something else? Unfortunately, I'm working with a protocol spec that doesn't include this ability and some messages can be very large. I'll bump the max data size and do some testing.

Thanks again and thanks for the work on this lib :)

from arduinowebsockets.

Links2004 avatar Links2004 commented on June 29, 2024

If the max size change works for you then its fine.
the websocket protokoll has support for fragmentation but not all servers support it.
as a result its currently not exposed in the lib.

whats needed for using the WS fragmentation is sendFrame calles with

WStype_FRAGMENT_TEXT_START,
WStype_FRAGMENT_BIN_START,
WStype_FRAGMENT,
WStype_FRAGMENT_FIN,

e.g.

  • WStype_FRAGMENT_TEXT_START
  • WStype_FRAGMENT (repeate as needed)
  • WStype_FRAGMENT_FIN

from arduinowebsockets.

blackcoffeexbt avatar blackcoffeexbt commented on June 29, 2024

This is great. Thanks for the help :)

from arduinowebsockets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.