JVM Languages
jqa0900.txt
Associated article: Java Q&A
Tags: JVM Languages
Published source code accompanying the article by Joshua Fox in which he examines SO_KEEPALIVE--a socket option that's responsible for killing the socket when the remote side is not available. Also see JQA0900.ZIP.
Java Q&A
by Joshua Fox
Listing One
public void run() {
try {
for(;;) {
output_stream.send(dummy_message);
}
} catch (IOException ioe){
socket_and_remote_resources.close();
}
}
Listing Two
private boolean message_just_received = false;
public void run() {
for(;;) {
try {
// ...


