ServerSocket GetSoTimeout() Example
Retrieve setting for SO_TIMEOUT.
ServerSocketclass GetSoTimeout() method example. This example shows you how to use GetSoTimeout() method.This method Retrieve setting for SO_TIMEOUT.
Here is the code:-
/**
* @Program that Retrieve setting for SO_TIMEOUT.
* GetSoTimeout.java
* Author:-RoseIndia Team
* Date:-21-jun-2008
*/
import java.net.*;
public class GetSoTimeout {
public static void main(String[] args) throws Exception{
InetAddress i = InetAddress.getByName("girish-desktop");
ServerSocket ss = new ServerSocket(8080, 1, i);
//Returns the binding state of the ServerSocket.
System.out.println("Setting for SO_TIMEOUT is: "+ss.getSoTimeout());
}
} |
Output of the program:-
Setting for SO_TIMEOUT is: 0 |
|