Disconnect client from Server/EthernetServer.

From the docs http://arduino.cc/en/Reference/Ethernet, EthernetServer class doesn't seem to have a disconnect method for disconnecting connected clients. If there are more than 4 clients connected, EthernetServer would froze until one or two of the clients disconnect. This is a limitation of the shield:

The Arduino Ethernet Shield allows an Arduino board to connect to the internet. It is based on the Wiznet W5100 ethernet chip (datasheet). The Wiznet W5100 provides a network (IP) stack capable of both TCP and UDP. It supports up to four simultaneous socket connections. Use the Ethernet library to write sketches which connect to the internet using the shield. The ethernet shield connects to an Arduino board using long wire-wrap headers which extend through the shield. This keeps the pin layout intact and allows another shield to be stacked on top. - http://arduino.cc/en/Main/ArduinoEthernetShield

Is there a way to disconnect clients from the EthernetServer once they're done doing their stuff?

You should be using the client functions after the server.available() call. Take a look at my server code. http://playground.arduino.cc/Code/WebServerST

This gets the client.

 EthernetClient client = server.available();

After that, use the client calls.

//and when you are finished sending packets

edit: client.stop() is the "disconnect".

Thank you!

:sweat_smile: What was on my mind!? XD