Multiple ethernet sockets - Web + UDP/TCP

Hello,

While developing an application that can talk to the arduino via regular ethernet, I found myself in need of a local web server on the arduino to do, for example, a first time configuration of the device before connecting.

I tried to setup two ethernet servers with different ports (ex. port 80 + 8080) to try my idea. Everything works fine except that when a connection is established to the web server, you are stuck in a while loop and cannot use the other ethernet server at the same time.

I’ve played around with client.available() and client() instead of the while loop but with no luck at all. Every time I get it to work, it’s one of the servers working until the client disconnects. Both works fine if I disable the other one.

Any thoughts?

Best regards,
Swoshie

Why must you have access to both servers at the same time? You can't wait for one client to finish before servicing the second?

edit: This post explains how I implement two servers on the ethernet shield. http://forum.arduino.cc//index.php?topic=151224.msg1135615#msg1135615