Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.net.*;
- import java.util.*;
- import java.io.IOException;
- class Main {
- static String hostname = new String("10.0.1.1");
- public static void main(String args[]) throws SocketException, UnknownHostException, IOException{
- InetAddress ia = InetAddress.getByName(hostname);
- MulticastSocket ssdpSocket = new MulticastSocket();
- ssdpSocket.setInterface(ia);
- System.out.println("Sending message from multicast socket on network interface: " + ssdpSocket.getNetworkInterface());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement