Skip to content
Snippets Groups Projects
Commit 909ca3f6 authored by terry-norbraten's avatar terry-norbraten
Browse files

rename util method

parent a767d157
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ public class EspduReceiver
InetAddress maddr = InetAddress.getByName(DisThreadedNetIF.DEFAULT_MCAST_GROUP);
InetSocketAddress group = new InetSocketAddress(maddr, DisThreadedNetIF.DEFAULT_DIS_PORT);
socket.joinGroup(group, DisThreadedNetIF.findIp4Interface());
socket.joinGroup(group, DisThreadedNetIF.findIpv4Interface());
// Loop infinitely, receiving datagrams
EntityID eid;
......
......@@ -37,7 +37,7 @@ public class EspduReceiverNIO
socket = new MulticastSocket(DisThreadedNetIF.DEFAULT_DIS_PORT);
maddr = InetAddress.getByName(DisThreadedNetIF.DEFAULT_MCAST_GROUP);
group = new InetSocketAddress(maddr, DisThreadedNetIF.DEFAULT_DIS_PORT);
socket.joinGroup(group, DisThreadedNetIF.findIp4Interface());
socket.joinGroup(group, DisThreadedNetIF.findIpv4Interface());
// Loop infinitely, receiving datagrams
while (true) {
......
......@@ -97,7 +97,7 @@ public class EspduSender
}
InetSocketAddress group = new InetSocketAddress(destinationIp, port);
socket.joinGroup(group, DisThreadedNetIF.findIp4Interface());
socket.joinGroup(group, DisThreadedNetIF.findIpv4Interface());
}
} // end networkModeString
}
......
......@@ -45,7 +45,7 @@ public class EspduSenderNIO
socket = new MulticastSocket(DisThreadedNetIF.DEFAULT_DIS_PORT);
maddr = InetAddress.getByName(DisThreadedNetIF.DEFAULT_MCAST_GROUP);
group = new InetSocketAddress(maddr, DisThreadedNetIF.DEFAULT_DIS_PORT);
socket.joinGroup(group, DisThreadedNetIF.findIp4Interface());
socket.joinGroup(group, DisThreadedNetIF.findIpv4Interface());
Vector3Double location;
EulerAngles orientation;
......
......@@ -292,7 +292,7 @@ public class PduSender
InetAddress localMulticastAddress = InetAddress.getByName(DisThreadedNetIF.DEFAULT_MCAST_GROUP);
MulticastSocket socket = new MulticastSocket(port);
InetSocketAddress group = new InetSocketAddress(localMulticastAddress, port);
socket.joinGroup(group, DisThreadedNetIF.findIp4Interface());
socket.joinGroup(group, DisThreadedNetIF.findIpv4Interface());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
......
......@@ -61,7 +61,7 @@ public class DisNetworking
Logger.getLogger(DisNetworking.class.getName()).log(Level.SEVERE, null, ex);
}
group = new InetSocketAddress(maddr, DIS_PORT);
ni = DisThreadedNetIF.findIp4Interface();
ni = DisThreadedNetIF.findIpv4Interface();
baos = new ByteArrayOutputStream();
dos = new DataOutputStream(baos);
}
......
......@@ -100,7 +100,7 @@ public class DisThreadedNetIF
Logger.getLogger(DisThreadedNetIF.class.getName()).log(Level.SEVERE, null, ex);
}
group = new InetSocketAddress(maddr, disPort);
ni = findIp4Interface();
ni = findIpv4Interface();
init();
}
......@@ -334,11 +334,11 @@ public class DisThreadedNetIF
}
/**
* Find proper interface
* Find proper IPV4 interface
*
* @return a network interface to use to join a multicast group
*/
public static NetworkInterface findIp4Interface() {
public static NetworkInterface findIpv4Interface() {
try {
Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();
NetworkInterface nif;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment