 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
nsastry1@gmail.com Guest
|
Posted: Sat Apr 22, 2006 7:12 pm Post subject: Timeouts in Java |
|
|
Hi,
I am implementing a TCP project, i need to know how to determine the
time outs in Java,
that is, If a client sends a message to server, then after 3 attempts,
if the server does not respond, the client should declare teh server to
be dead, so how to determine this timeout in Java, please help
Thanks,
Sastry |
|
| Back to top |
|
 |
Gordon Beaton Guest
|
Posted: Mon Apr 24, 2006 7:12 am Post subject: Re: Timeouts in Java |
|
|
On 22 Apr 2006 11:45:50 -0700, nsastry1 (AT) gmail (DOT) com wrote:
| Quote: | I am implementing a TCP project, i need to know how to determine the
time outs in Java, that is, If a client sends a message to server,
then after 3 attempts, if the server does not respond, the client
should declare teh server to be dead, so how to determine this
timeout in Java, please help
|
Use Selector.select(timeout).
Why not just use a single (longer) timeout before declaring the server
dead? I.e. why do you think it's necessary to resend the original
message?
/gordon
--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|