java - SocketTimeoutException problem - how to continue after exception -


i write , read in function using socket class. used

synchronized(socket){ .//write; //read; } 

i doing (repeat) every 50-1000 ms. problem when ( unknown reason ) pluged off cable ( got sockettimeoutexception). when pluged in again, need continue. ? need close socket in catch block , create new ? or else ?

you don't have anything. continue. if other exception, close socket , restart (if appropriate).


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -