• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

SocketChannel timout. Please help.

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
My application contains the following code:
SocketChannel s = SocketChannel.open();
s.connect(.....);
s.configureBlocking(false);
s.socket().setKeepAlive(true);
It seemed to me that the socket related to the SocketChannel gets timed out after an hour if no traffic is using this socket.
Does anyone know the default timeout of a socket?
And how to keep it alive constantly?
Thanks in advance!
 
reply
    Bookmark Topic Watch Topic
  • New Topic