Skip to content

Conversation

@mcmchris
Copy link

@mcmchris mcmchris commented Nov 15, 2025

Description

Added the non disruptive support to change m_iobuf from a fixed-size array to a pointer and add m_iobuf_size for dynamic memory management.

Fixes # (issue)

Type of change

Please uncheck options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
    • I have made the appropriate changes to documentation already

How Has This Been Tested?

I tested this code by using a custom PCB that features the W5500 and it is using Ethernet to download OTA firmware updates from Github. With the original 2048 fixed buffer the download was very slow and cut in small chunks, with the dynamic buffer, I went from 2:30 minutes download to 10 seconds. Also, I tested backward compatibility.

  • Test A
  • Test B

Test Configuration:

  • Device type: ESP32S2
  • SSLClient version: 1.6.11
  • Arduino core version: ESP32 3.3.3
  • Additional library versions: Ethernet.h @ 2.0.2, ArduinoJson.h @ 7.4.2
  • Hardware: W5500 Shield with this pinout:
#define ETH_CS   33
#define ETH_SCLK 36
#define ETH_MISO 37
#define ETH_MOSI 35
#define ETH_RST  -1  // -1 if not used

Added the support to define the m_iobuf size in the constructor.
Changed m_iobuf from a fixed-size array to a pointer and added m_iobuf_size for dynamic memory management.
Added buffer_size parameter to SSLClient constructor for improved flexibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant