Fixed RandomGenerator2
This commit is contained in:
parent
1acd532363
commit
9610421e97
@ -28,7 +28,7 @@ public class RandomGenerator2 {
|
||||
new NetworkDumper(firstNode);
|
||||
|
||||
for (int i = 0; i < START_NODES; i++) {
|
||||
nodes.add(new Node());
|
||||
spawn();
|
||||
}
|
||||
|
||||
while (true) {
|
||||
|
||||
@ -221,14 +221,12 @@ public class Node {
|
||||
}
|
||||
|
||||
public void gatherInformationOfNetwork() {
|
||||
byte[] myAddr;
|
||||
try {
|
||||
myAddr = BufferUtil.addrToBytes(((InetSocketAddress) channel
|
||||
byte[] myAddr = BufferUtil.addrToBytes(((InetSocketAddress) channel
|
||||
.getLocalAddress()));
|
||||
sendBroadcast(MessageType.STATUS, myAddr);
|
||||
} catch (IOException e) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void setNeighborsOfNode(String node, List<String> neighbors) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user