Skip to content

Commit

Permalink
Merge pull request #68 from insetsro/configurable-buffer-size-and-tim…
Browse files Browse the repository at this point in the history
…eouts

Use #ifndef for all constants
  • Loading branch information
xreef authored Sep 12, 2024
2 parents f5e9cf9 + 04296b1 commit a655af4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions FtpServerKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,23 @@ However, the last one, that will break anything that uses the ESP32 WiFi library

//#define SD_CS_PIN 4
// Disconnect client after 5 minutes of inactivity (expressed in seconds)
#define FTP_TIME_OUT 5 * 60
#ifndef FTP_TIME_OUT
#define FTP_TIME_OUT 5 * 60
#endif


// Wait for authentication for 10 seconds (expressed in seconds)
#define FTP_AUTH_TIME_OUT 10
#ifndef FTP_AUTH_TIME_OUT
#define FTP_AUTH_TIME_OUT 10
#endif


// Size of file buffer for read/write
// Transfer speed depends of this value
// Best value depends on many factors: SD card, client side OS, ...
// But it can be reduced to 512 if memory usage is critical.
#define FTP_BUF_SIZE 1024 //2048 //1024 // 512
#ifndef FTP_BUF_SIZE
#define FTP_BUF_SIZE 1024 //2048 //1024 // 512
#endif

#endif // FTP_SERVER_CONFIG_H

0 comments on commit a655af4

Please sign in to comment.