[jboss-jira] [JBoss JIRA] Commented: (JGRP-639) UDP: bind MulticastSocket to multicast address
Bela Ban (JIRA)
jira-events at lists.jboss.org
Mon Dec 24 04:15:43 EST 2007
[ http://jira.jboss.com/jira/browse/JGRP-639?page=comments#action_12393339 ]
Bela Ban commented on JGRP-639:
-------------------------------
I tried to bind the MulticastSocket to the multicast address and port, but it failed on Linux & MacOs with an exception "cannot assign requested address". This was done with mcreceive.c, attached to http://jira.jboss.com/jira/browse/JGRP-515.
/* construct a multicast address structure */
memset(&mc_addr, 0, sizeof(mc_addr));
mc_addr.sin_family = AF_INET;
mc_addr.sin_addr.s_addr = htonl(INADDR_ANY); // <===
mc_addr.sin_port = htons(mc_port);
was changed to
/* construct a multicast address structure */
memset(&mc_addr, 0, sizeof(mc_addr));
mc_addr.sin_family = AF_INET;
mc_addr.sin_addr.s_addr = htonl(mc_addr_str); // <===
mc_addr.sin_port = htons(mc_port);
This does not work on Windows, MacOs and Linux (2.6.22) !
> UDP: bind MulticastSocket to multicast address
> ----------------------------------------------
>
> Key: JGRP-639
> URL: http://jira.jboss.com/jira/browse/JGRP-639
> Project: JGroups
> Issue Type: Task
> Reporter: Bela Ban
> Assigned To: Bela Ban
> Priority: Minor
> Fix For: 2.7, 2.4.2, 2.5.2, 2.6.2
>
>
> This doesn't work on Windows, so try-catch it and create new MulticastSocket with a wildcard bind address.
> (2.4.2 is the equivalent of 2.4.1. SP5) - Bela
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list