MulticastSocket GetLoopbackMode() Example
returns true if the LoopbackMode has been disabled
MulticastSocketclass GetLoopbackMode() method example. This example shows you how to use GetLoopbackMode() method.This method returns true if the LoopbackMode has been disabled
Here is the code:-
/*
* @Program that Get the setting for local loopback of multicast datagrams.
* GetLoopbackMode.java
* Author:-RoseIndia Team
* Date:-27-Jun-2008
*/
import java.net.*;
public class GetLoopbackMode {
public static void main(String[] args) throws Exception {
SocketAddress sa = new InetSocketAddress(8080);
MulticastSocket ms = new MulticastSocket(sa);
//Get the setting for local loopback of multicast datagrams.
System.out.println("LoopbackMode has been disabled: "
+ms.getLoopbackMode());
}
} |
Output of the program:-
| LoopbackMode has been disabled: false |
|