ServerSocket GetReceiveBufferSize() Example
Gets the value of the SO_RCVBUF option for this ServerSocket,
ServerSocketclass GetReceiveBufferSize() method example. This example shows you how to use GetReceiveBufferSize() method.This method Gets the value of the SO_RCVBUF option for this ServerSocket,
Here is the code:-
/**
* @Program that Gets the value of the SO_RCVBUF option for this ServerSocket
* GetReceiveBufferSize.java
* Author:-RoseIndia Team
* Date:-21-jun-2008
*/
import java.net.*;
public class GetReceiveBufferSize {
public static void main(String[] args) throws Exception {
InetAddress i = InetAddress.getByName("girish-desktop");
ServerSocket ss = new ServerSocket(8080, 1, i);
System.out.println("RCVBUF option for this ServerSocket is: " + ss.getReceiveBufferSize());
}
} |
Output of the program:-
| RCVBUF option for this ServerSocket is: 43690 |
|