I'm trying to create a 'TCP Command Server' that allows users (or more likely, applications) to connect and send commands to be processed. It is very similar to a Telnet server.
The requirement is to allow multiple users at the same time and place incoming data into buffers until we have a full command. (to allow commands send over multiple buffers, etc)
Here is my code: http://playground.arduino.cc/Code/TCPCommandServer
Can anybody give it a review and let me know if you see any problems?
I've noticed there is already a Telnet server on the playground (http://playground.arduino.cc/Code/Telnet), but I'm not sure why it appears to be more complicated and using the Wiznet driver directly. (There is probably a reason and that's why I'm asking what might be wrong with my code)