Using two TCP Ports?

Hi *,

before I spend money on a wrong idea, I want to ask: is it possible to let the arduino listen to two TCP ports? Preferably with wifi, or perhaps with the ethernet shield. The (not very finished) idea is to send commands via a sort of telnet (or perhaps UPD) and get some immediate feedback there, but have additionally a small web server to display (e.g.) the values on the analogue ports. The alternative solution would be the web server via ethernet and the "telnet" communication with xbees, but this is (for the moment) a little bit expensive (I have to convince my beloved "secretary of finances ;)).

best regards
Andreas