Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
045578c7
Commit
045578c7
authored
5 years ago
by
Terry D. Norbraten
Browse files
Options
Downloads
Patches
Plain Diff
consolidate vars
parent
0679d00d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/edu/nps/moves/dis7/utilities/DisThreadedNetIF.java
+2
-6
2 additions, 6 deletions
src/edu/nps/moves/dis7/utilities/DisThreadedNetIF.java
with
2 additions
and
6 deletions
src/edu/nps/moves/dis7/utilities/DisThreadedNetIF.java
+
2
−
6
View file @
045578c7
...
@@ -167,6 +167,7 @@ public class DisThreadedNetIF
...
@@ -167,6 +167,7 @@ public class DisThreadedNetIF
private
Thread
receiver
;
private
Thread
receiver
;
private
MulticastSocket
socket
=
null
;
private
MulticastSocket
socket
=
null
;
private
InetAddress
maddr
;
private
void
init
()
private
void
init
()
{
{
...
@@ -186,8 +187,7 @@ public class DisThreadedNetIF
...
@@ -186,8 +187,7 @@ public class DisThreadedNetIF
byte
buffer
[]
=
new
byte
[
MAX_DIS_PDU_SIZE
];
byte
buffer
[]
=
new
byte
[
MAX_DIS_PDU_SIZE
];
DatagramPacket
packet
=
new
DatagramPacket
(
buffer
,
buffer
.
length
);
DatagramPacket
packet
=
new
DatagramPacket
(
buffer
,
buffer
.
length
);
InetAddress
maddr
;
InetSocketAddress
group
;
InetSocketAddress
group
=
null
;
Pdu
pdu
;
Pdu
pdu
;
ByteBuffer
byteBuffer
;
ByteBuffer
byteBuffer
;
...
@@ -232,16 +232,13 @@ public class DisThreadedNetIF
...
@@ -232,16 +232,13 @@ public class DisThreadedNetIF
private
final
Runnable
sendThread
=
()
->
{
private
final
Runnable
sendThread
=
()
->
{
InetAddress
maddr
;
Pdu
pdu
;
Pdu
pdu
;
byte
[]
data
;
byte
[]
data
;
DatagramPacket
packet
;
DatagramPacket
packet
;
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
();
DataOutputStream
dos
=
new
DataOutputStream
(
baos
);
DataOutputStream
dos
=
new
DataOutputStream
(
baos
);
while
(!
killed
)
{
try
{
try
{
maddr
=
InetAddress
.
getByName
(
mcastGroup
);
while
(!
killed
)
{
while
(!
killed
)
{
pdu
=
pdus2send
.
take
();
pdu
=
pdus2send
.
take
();
...
@@ -272,7 +269,6 @@ public class DisThreadedNetIF
...
@@ -272,7 +269,6 @@ public class DisThreadedNetIF
}
}
if
(!
killed
)
if
(!
killed
)
sleep
(
5000
);
sleep
(
5000
);
}
};
};
private
void
toListeners
(
Pdu
pdu
)
private
void
toListeners
(
Pdu
pdu
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment