Question on JxtaMulticastSocket
John Clukies <[email protected]>
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAyQVDeP78E0OTGmDQj/[email protected]> |
Newbie to JXTA, so bear with me! :-) In the tutorial, there is a comment where the first call to JxtaMulticastSocket.receive() that it expects to see the message it sent first, and that the right thing to do is to check if it originated from this peer. It also states that it would check the datagram address against the PeerID. I tried to implement this, and I ended up checking it this way: PeerID peerID = netPeerGroup.getPeerID(); // returns "urn:jxta:uuid-596..." String packetHostName = rpacket.getAddress().getHostName(); // returns "uuid-596." As you can see, they match except for the "urn:jxta" in front of the PeerID. Two questions: 1. Is there a different method that I can use to match the DatagramPacket address vs. the PeerID? 2. If not, is the "urn:jxta" standard on all PeerIDs, so should I just match strings after the "urn:jxta"? Thanks for your help. John