hi,
today the cvs is a little bit broken.
in localDevice.java the getAddress calls the wrong constructor:
private byte[] getLocalIPAddress() throws UnknownHostException, SocketException
{
Enumeration<NetworkInterface> netInter = NetworkInterface.getNetworkInterfaces();
int n = 0;
while (netInter.hasMoreElements())
{
NetworkInterface ni = netInter.nextElement();
System.out.println("NetworkInterface " + n++ + ": " + ni.getDisplayName());
for (InetAddress iaddress : Collections.list(ni.getInetAddresses()))
{
System.out.println("CanonicalHostName: " + iaddress.getCanonicalHostName());
System.out.println("IP: " + iaddress.getHostAddress());
System.out.println("Loopback? " + iaddress.isLoopbackAddress());
System.out.println("SiteLocal? " + iaddress.isSiteLocalAddress());
System.out.println();
if (false == iaddress.isLoopbackAddress() && iaddress.isSiteLocalAddress())
return iaddress.getAddress();
}
}
return InetAddress.getLocalHost().getAddress();
}
public Address getAddress() {
try {
return new Address(null, getLocalIPAddress(), messageControl.getPort());
}
catch (UnknownHostException e) {
// Should never happen, so just wrap in a RuntimeException
throw new RuntimeException(e);
}
catch (SocketException e) {
// Should never happen, so just wrap in a RuntimeException
throw new RuntimeException(e);
}
}
in the class Address the networkNumber member has to of type Unsigned16.
correct all compiling errrors and you are ready to add yourself as listener in the notification objects.
regards
robert
you can change that quickly.