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

use InetSocketAddress

parent f44ffab3
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ public class EspduSenderNIO ...@@ -42,7 +42,7 @@ public class EspduSenderNIO
eid.setEntityID((short) 2); eid.setEntityID((short) 2);
try { try {
socket = new MulticastSocket(DisThreadedNetIF.DEFAULT_DIS_PORT); socket = new MulticastSocket();
maddr = InetAddress.getByName(DisThreadedNetIF.DEFAULT_MCAST_GROUP); maddr = InetAddress.getByName(DisThreadedNetIF.DEFAULT_MCAST_GROUP);
group = new InetSocketAddress(maddr, DisThreadedNetIF.DEFAULT_DIS_PORT); group = new InetSocketAddress(maddr, DisThreadedNetIF.DEFAULT_DIS_PORT);
socket.joinGroup(group, DisThreadedNetIF.findIpv4Interface()); socket.joinGroup(group, DisThreadedNetIF.findIpv4Interface());
...@@ -51,7 +51,7 @@ public class EspduSenderNIO ...@@ -51,7 +51,7 @@ public class EspduSenderNIO
EulerAngles orientation; EulerAngles orientation;
float psi; float psi;
byte[] data = new byte[144]; byte[] data = new byte[144];
DatagramPacket packet = new DatagramPacket(data, data.length, maddr, DisThreadedNetIF.DEFAULT_DIS_PORT); DatagramPacket packet = new DatagramPacket(data, data.length, group);
while (true) { while (true) {
for (int idx = 0; idx < 100; idx++) { for (int idx = 0; idx < 100; idx++) {
......
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