Socket SO KEEPALIVE: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* https://docs.oracle.com/javase/10/docs/api/java/net/SocketOptions.html#SO_KEEPALIVE
=Internal=
=Internal=


* [[Java_Networking#Socket_Configuration|Java Networking]]
* [[Java_Networking#Socket_Configuration|Java Networking]]
* [[TCP_KeepAlive#Configuration|TCP Keep-Alive]]


=Overview=
=Overview=
Tells whether the TCP Keep-Alive mechanism is turned on for a socket. TCP Keep-Alive works as described here: {{Internal|TCP_KeepAlive#Overview|TCP Keep-Alive}}
The value of the configuration flag can be obtained from the Socket or from the SocketChannel with <tt>supportedOptions()</tt>.


All we can do on a Java socket is to turn TCP KeepAlive on or off - apparently on a per-socket based:
All we can do on a Java socket is to turn TCP KeepAlive on or off - apparently on a per-socket based:
Line 12: Line 21:
</pre>
</pre>


The KeepAlive parameters can be only set at the operating system level.  
The KeepAlive parameters can be only set at the operating system level.
 
<font color=red>
See: https://home.feodorov.com:9443/wiki/Wiki.jsp?page=TCP#section-TCP-KeepAlive
</font>

Latest revision as of 16:59, 26 July 2018

External

Internal

Overview

Tells whether the TCP Keep-Alive mechanism is turned on for a socket. TCP Keep-Alive works as described here:

TCP Keep-Alive

The value of the configuration flag can be obtained from the Socket or from the SocketChannel with supportedOptions().

All we can do on a Java socket is to turn TCP KeepAlive on or off - apparently on a per-socket based:

void setKeepAlive(boolean);
boolean getKeepAlive();

The KeepAlive parameters can be only set at the operating system level.