Skip to content

Commit 155ab11

Browse files
Merge pull request #345 from willmmiles/esp8266-response-buffers
Support ESP8266 TCP stack config
2 parents 8dd3167 + 7a33988 commit 155ab11

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/WebResponseImpl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
1616
#include "./literals.h"
1717

1818
#ifndef CONFIG_LWIP_TCP_MSS
19+
#ifdef TCP_MSS // ESP8266
20+
#define CONFIG_LWIP_TCP_MSS TCP_MSS
21+
#else
1922
// as it is defined for ESP32's Arduino LWIP
2023
#define CONFIG_LWIP_TCP_MSS 1436
2124
#endif
25+
#endif
2226

2327
#define ASYNC_RESPONCE_BUFF_SIZE CONFIG_LWIP_TCP_MSS * 2
2428
// It is possible to restore these defines, but one can use _min and _max instead. Or std::min, std::max.

src/WebResponses.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010
#include <utility>
1111

1212
#ifndef CONFIG_LWIP_TCP_WND_DEFAULT
13+
#ifdef TCP_WND // ESP8266
14+
#define CONFIG_LWIP_TCP_WND_DEFAULT TCP_WND
15+
#else
1316
// as it is defined for esp32's LWIP
1417
#define CONFIG_LWIP_TCP_WND_DEFAULT 5760
1518
#endif
19+
#endif
1620

1721
using namespace asyncsrv;
1822

0 commit comments

Comments
 (0)