ArduinoHttpClient icon indicating copy to clipboard operation
ArduinoHttpClient copied to clipboard

Increase buffer socket size

Open ddaydd opened this issue 5 years ago • 6 comments

Hi,

can the buffer socket size be increased or is it a physical limit?

WebSocketClient.h : 89

uint8_t iTxBuffer[128];

ddaydd avatar May 07 '19 17:05 ddaydd

Hi @ddaydd,

I think we can make the size bigger for non-AVR boards. What board are you using and what size do you need?

sandeepmistry avatar May 13 '19 17:05 sandeepmistry

my hardware is arduino mega 2560 with ethernet shield W5100, I think 200 characters would be fine, it's possible?

ddaydd avatar May 13 '19 20:05 ddaydd

@sandeepmistry no news?

ddaydd avatar Jun 07 '19 20:06 ddaydd

Is there a good reason not to create a setitXBuffersize function or add a constrctor to websocket ? Or at least a way to modify via #define... What's the best option to your opinion..?

This is a large limitation of clean reuse httparduinoclient on other websocket project like mqtt/pubsubclient over wss... (Cf Areve repo)

clysss avatar Dec 05 '20 10:12 clysss

Thank you for this comment thread. I'm a noob that had an issue sending websockets using an Arduino Nano Uno Rev2. I got it work but as soon as I sent a semi bigger socket command it would screw up the Arduino. I just increased that iTxBuffer to 256 and I'm back in business!!!!

asoap avatar Feb 11 '21 06:02 asoap

at least a way to modify via #define

There is now a proposal for that here: https://github.com/arduino-libraries/ArduinoHttpClient/pull/124

per1234 avatar Jan 25 '22 12:01 per1234