getLocalAddress -> getLocalSocketAddress !

This commit is contained in:
M.Scholz 2012-11-19 16:13:15 +01:00
parent fed78ba956
commit 30a6d7bde2

View File

@ -35,7 +35,7 @@ public class Node {
channel.socket().bind(null);
buf = ByteBuffer.allocate(BUF_SIZE);
this.name = channel.getLocalAddress().toString();
this.name = channel.socket().getLocalSocketAddress().toString();
udpListen = new UDPListen();
thread = new Thread(udpListen);
@ -75,12 +75,7 @@ public class Node {
}
public SocketAddress getAddress() {
try {
return channel.getLocalAddress();
} catch (IOException e) {
LOGGER.severe("Address not set yet.");
}
return null;
return channel.socket().getLocalSocketAddress();
}
private void putAddrInBuf(ByteBuffer buf, SocketAddress addr) {