AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Timeouts in Java

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
nsastry1@gmail.com
Guest





PostPosted: Sat Apr 22, 2006 7:12 pm    Post subject: Timeouts in Java Reply with quote



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





PostPosted: Mon Apr 24, 2006 7:12 am    Post subject: Re: Timeouts in Java Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.