Skip to content

Commit

Permalink
AsyncResponseStream: Use TCP_MSS as default size
Browse files Browse the repository at this point in the history
  • Loading branch information
willmmiles committed Sep 8, 2024
1 parent c425305 commit 0e84461
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ESPAsyncWebServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class AsyncWebServerRequest {
AsyncWebServerResponse *beginResponse(Stream &stream, const String& contentType, size_t len, AwsTemplateProcessor callback=nullptr);
AsyncWebServerResponse *beginResponse(const String& contentType, size_t len, AwsResponseFiller callback, AwsTemplateProcessor templateCallback=nullptr);
AsyncWebServerResponse *beginChunkedResponse(const String& contentType, AwsResponseFiller callback, AwsTemplateProcessor templateCallback=nullptr);
AsyncResponseStream *beginResponseStream(const String& contentType, size_t bufferSize=1460);
AsyncResponseStream *beginResponseStream(const String& contentType, size_t bufferSize=TCP_MSS);
AsyncWebServerResponse *beginResponse_P(int code, const String& contentType, const uint8_t * content, size_t len, AwsTemplateProcessor callback=nullptr);
AsyncWebServerResponse *beginResponse_P(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback=nullptr);

Expand Down
2 changes: 1 addition & 1 deletion src/WebResponseImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class AsyncResponseStream: public AsyncAbstractResponse, public Print {
DynamicBufferListPrint _print;
size_t _offset;
public:
AsyncResponseStream(const String& contentType, size_t bufferSize);
AsyncResponseStream(const String& contentType, size_t bufferSize=TCP_MSS);
~AsyncResponseStream();
bool _sourceValid() const { return (_state < RESPONSE_END); }
virtual size_t _fillBuffer(uint8_t *buf, size_t maxLen) override;
Expand Down

0 comments on commit 0e84461

Please sign in to comment.