Created
April 2, 2013 17:46
-
-
Save mattieb/5294450 to your computer and use it in GitHub Desktop.
Just a silly little test of Java multicasting.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.*; | |
class Sender { | |
public static void main(String[] args) throws Throwable { | |
MulticastSocket socket = new MulticastSocket(new InetSocketAddress(InetAddress.getByName("10.42.0.3"), 9999)); | |
InetAddress groupAddress = InetAddress.getByName("239.192.0.1"); | |
socket.send(new DatagramPacket(new byte[0], 0, groupAddress, 9999)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment