• Post Reply Bookmark Topic Watch Topic
  • New Topic

SocketChannel timout. Please help.

 
Rob Chung
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • 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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!