tcp/ip connection question

Hi,

I am building a simple showcontroller from an arduino with an ethernetshield, using pjlink to switch on/off projectors and powerswitches. This works for one projector, and also for more projectors on different IP's. BUT my question is:

I use:
Ethernet.begin(mac, ip);
to start the connection,

then I proceed

if (client.connect(serv, 4352)) {
Serial.println("connected to projector....");
// send command to projector
client.println(command);

if this is succesfull (it usually is) then I proceed to the next computer. Why do I have to start with
Ethernet.begin(mac, ip);
again for the next projector? As I figure the arduino is still connected? After 30 secs the first projector will quit the connection. Does this mean I have to use Ethernet.begin again to start a new clientconnection to another IP?

Hans

Ethernet.begin() should be called only once in your setup() function.

The client.connect(serv,4352) must be called every time you want to connect to another device or the same device again. Insure you call client.stop() when you are finished with that connection.

the pjlink protocol closes the connection after 30 sec of inactivity. So to start a new command I setup a new connection using client.connect That sounds logic. Might be more straigtforward to close the connection after receiving an ok from the projector and setup a connection for each command.

Is it possible to connect to several projectors at the same time, to speed up the starting routine?