Author: jfrederic.clere(a)jboss.com
Date: 2009-05-28 10:02:07 -0400 (Thu, 28 May 2009)
New Revision: 2452
Modified:
trunk/mod_cluster/test/java/SAdvertize.java
Log:
Bind to have the same behaviour than httpd.
Modified: trunk/mod_cluster/test/java/SAdvertize.java
===================================================================
--- trunk/mod_cluster/test/java/SAdvertize.java 2009-05-26 09:50:55 UTC (rev 2451)
+++ trunk/mod_cluster/test/java/SAdvertize.java 2009-05-28 14:02:07 UTC (rev 2452)
@@ -1,15 +1,20 @@
import java.net.MulticastSocket;
import java.net.InetAddress;
+import java.net.InetSocketAddress;
import java.net.DatagramPacket;
public class SAdvertize
{
public static void main(String[] args) throws Exception
{
- // InetAddress group = InetAddress.getByName("224.0.1.105");
- InetAddress group = InetAddress.getByName("232.0.0.2");
- MulticastSocket s = new MulticastSocket(23364);
- s.setTimeToLive(16);
+ InetAddress group = InetAddress.getByName("224.0.1.105");
+ // InetAddress group = InetAddress.getByName("232.0.0.2");
+ InetAddress addr = InetAddress.getByName("10.16.88.178");
+ // InetAddress addr = InetAddress.getByName("172.17.41.254");
+ InetSocketAddress addrs = new InetSocketAddress(addr, 23364);
+
+ MulticastSocket s = new MulticastSocket(addrs);
+ s.setTimeToLive(29);
s.joinGroup(group);
boolean ok = true;
while (ok) {