diff --git a/src/Ethernet.h b/src/Ethernet.h index 745fa4a3..5ed8a769 100644 --- a/src/Ethernet.h +++ b/src/Ethernet.h @@ -33,11 +33,13 @@ // up to 4 sockets. W5200 & W5500 can have up to 8 sockets. Several bytes // of RAM are used for each socket. Reducing the maximum can save RAM, but // you are limited to fewer simultaneous connections. +#ifndef MAX_SOCK_NUM #if defined(RAMEND) && defined(RAMSTART) && ((RAMEND - RAMSTART) <= 2048) #define MAX_SOCK_NUM 4 #else #define MAX_SOCK_NUM 8 #endif +#endif // By default, each socket uses 2K buffers inside the WIZnet chip. If // MAX_SOCK_NUM is set to fewer than the chip's maximum, uncommenting