Go Down

Topic: How big is the Ethernet Client Read Buffer? (Read 1 time) previous topic - next topic

Mavromatis

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?  


PaulS

The types.h file in the Ethernet library contains this:
Code: [Select]
#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.

Mavromatis

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?  

Mavromatis

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?

Mavromatis

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.

Mavromatis

Actually... when I check client.available I still get 2048... how do I change it to something bigger?

westfw

As a guess, it's because the chips supports four simultaneous connections...

Go Up