I'm wondering how big the ethernet client read buffer is and what happens if you don't read it fast enough? Does it overflow, dump and restart?
The types.h file in the Ethernet library contains this:
#define TX_RX_MAX_BUF_SIZE 2048
So, it looks like the transmit and receive buffers are 2048 characters long. Once the receive buffer is full, data is discarded.
Why isn't it the full 8k? That is what the W5100 has for the rx, 16kb total with tx buffer. Why was 2k chosen?
I bumped it up to 3078 (added 1024) to it and it looks like it fixes my issues! Does anyone know why 2048 limit was set? I'd like us to use the full 8kb buffer if possible?
P.S. Who are the founding fathers of the ethernet shield code? I'd like to really know what the logic was surrounding the 2048 limit... it's not commented very well (not at all) so it's hard to figure out the reasoning.
Actually... when I check client.available I still get 2048... how do I change it to something bigger?
As a guess, it's because the chips supports four simultaneous connections...