List of usage examples for java.net Socket getKeepAlive
public boolean getKeepAlive() throws SocketException
From source file:Main.java
public static void main(String[] args) throws Exception { Socket client = new Socket("google.com", 80); System.out.println(client.getKeepAlive()); client.close();/* w w w. j a va 2s. com*/ }
From source file:Main.java
public static void main(String[] args) throws Exception { Socket client = new Socket("google.com", 80); client.setKeepAlive(true);/*from w w w. ja v a 2 s .c o m*/ System.out.println(client.getKeepAlive()); client.close(); }