/** * INTERNAL: * Create the multicast socket and join the multicast group. */ public void createCommunicationSocket() { Object[] args = { multicastGroupAddress, "" + multicastPort }; rcm.logDebug("initializing_discovery_resources", args); if (communicationSocket == null) { try { communicationSocket = new MulticastSocket(multicastPort); communicationSocket.setTimeToLive(getPacketTimeToLive()); communicationSocket.joinGroup(InetAddress.getByName(multicastGroupAddress)); } catch (IOException ex) { // Either we couldn't create the socket or we couldn't join the group DiscoveryException discoveryEx = DiscoveryException.errorJoiningMulticastGroup(ex); rcm.handleException(discoveryEx); } } }
/** * INTERNAL: * Create the multicast socket and join the multicast group. */ public void createCommunicationSocket() { Object[] args = { multicastGroupAddress, "" + multicastPort }; rcm.logDebug("initializing_discovery_resources", args); if (communicationSocket == null) { try { communicationSocket = new MulticastSocket(multicastPort); communicationSocket.setTimeToLive(getPacketTimeToLive()); communicationSocket.joinGroup(InetAddress.getByName(multicastGroupAddress)); } catch (IOException ex) { // Either we couldn't create the socket or we couldn't join the group DiscoveryException discoveryEx = DiscoveryException.errorJoiningMulticastGroup(ex); rcm.handleException(discoveryEx); } } }
/** * INTERNAL: * Create the multicast socket and join the multicast group. */ public void createCommunicationSocket() { Object[] args = { multicastGroupAddress, "" + multicastPort }; rcm.logDebug("initializing_discovery_resources", args); if (communicationSocket == null) { try { communicationSocket = new MulticastSocket(multicastPort); communicationSocket.setTimeToLive(getPacketTimeToLive()); communicationSocket.joinGroup(InetAddress.getByName(multicastGroupAddress)); } catch (IOException ex) { // Either we couldn't create the socket or we couldn't join the group DiscoveryException discoveryEx = DiscoveryException.errorJoiningMulticastGroup(ex); rcm.handleException(discoveryEx); } } }