blocking client connection, if server down

Hi,is there a way for a client connection (an io socket, not by using nio channel) to block for a server, if the server is currently down?Thanks
[165 byte] By [uiga] at [2007-11-26 19:09:32]
# 1
Block for a server?I don't know what you mean, but it sounds like the answer is no. Kaj
kajbja at 2007-7-9 21:04:30 > top of Java-index,Java Essentials,Java Programming...
# 2
... just create a thead that tried to reconnect to the server.
kajbja at 2007-7-9 21:04:30 > top of Java-index,Java Essentials,Java Programming...
# 3

There's much more to this than the OP realizes:

1) if the server is down before the client could establish a connection,

the client has to keep retrying to make a connection.

2) if the server goes down while the client was waiting/reading for some

data, the connection is lost, the partial data must be kept or thrown

away depending on the communication protocol and the client should

repeat step 1) again.

3) if the server goes down while the client was writing to the server, the

write fails and the entire shebang should be restarted at step 1) again.

Personally I wouldn't bother and simply spit out a "connection lost,

please try again later" towards the general direction of the user.

kind regards,

Jos

JosAHa at 2007-7-9 21:04:30 > top of Java-index,Java Essentials,Java Programming...