Advertisement
Guest User

Untitled

a guest
Jan 31st, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import java.net.*;
  2. import java.util.*;
  3. import java.io.IOException;
  4.  
  5. class Main {
  6. static String hostname = new String("10.0.1.1");
  7.  
  8. public static void main(String args[]) throws SocketException, UnknownHostException, IOException{
  9. InetAddress ia = InetAddress.getByName(hostname);
  10. MulticastSocket ssdpSocket = new MulticastSocket();
  11.  
  12. ssdpSocket.setInterface(ia);
  13. System.out.println("Sending message from multicast socket on network interface: " + ssdpSocket.getNetworkInterface());
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement