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[] argsthrows Exception{
InetAddress i = InetAddress.getByName("girish-desktop");
        ServerSocket ss = new ServerSocket(80801, 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

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US