This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help in sokets  RSS feed

 
Chennarao Marvatu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Friends,

I have connected to server and waiting for reply from the server
and suddenly server crashed OR server unable to respond then i have to
come out how it is possible

thanks
chennarao
 
Bhushan Damle
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can have ur client code in a loop within try & catch blocks.
when ur server will be down, there will be an exception in client code & control will go to catch block. There u write code to continue in the loop. Hence ur client prog. will not terminate there & u can achieve ur goal.
Tell me if it works or not
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!