Ethernet Receive Buffering?

I'm having an odd problem with receiving data over Ethernet. Transmit works fine, no matter how much data I send. But receive seems to be relatively easy to overwhelm, resulting in corrupted data, and even buffer corruption that results in the code seeing character sequences that were actually sent at an earlier time. Closing and re-opening the connection "cures" the problem, so it appears the corruption is occurring in the Ethernet stack, rather than in my code.

I am using a simple socket connection, and basically treating the the interface as a serial port. I assume receive data is getting buffered somewhere in EthernetClient. How big is the buffer? Does it depend on regular polling of available or something similar, to ensure data is moved from the W5100 to the RAM buffers?

Regards,
Ray L.

I assume receive data is getting buffered somewhere in EthernetClient.

Not really, the buffer is in the WizNet 5100 chip.

How big is the buffer?

It should be 2048 bytes.

Does it depend on regular polling of available or something similar, to ensure data is moved from the W5100 to the RAM buffers?

Actually it depends on regular processing of incoming data so the buffer does not overwhelm. The platform is not designed to operate continuously at Ethernet or even Fast Ethernet speeds.