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
9167d4b8
Commit
9167d4b8
authored
5 years ago
by
Terry D. Norbraten
Browse files
Options
Downloads
Patches
Plain Diff
PduFactory already wraps in a ByteBuffer
parent
2395e0bf
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 @
9167d4b8
...
...
@@ -75,9 +75,7 @@ public class DisThreadedNetIF
/* *********** queues and lists and public methods ************** */
private
final
List
<
PduListener
>
everyTypeListeners
=
new
ArrayList
<>();
private
final
Map
<
DISPDUType
,
List
<
PduListener
>>
typeListeners
=
new
HashMap
<>();
private
final
List
<
RawPduListener
>
rawListeners
=
new
ArrayList
<>();
private
final
LinkedBlockingQueue
<
Pdu
>
pdus2send
=
new
LinkedBlockingQueue
<>();
/**
...
...
@@ -203,10 +201,8 @@ public class DisThreadedNetIF
socket
.
receive
(
packet
);
//blocks here waiting for next DIS pdu to be received on multicast IP and specified port
toRawListeners
(
packet
.
getData
(),
packet
.
getLength
());
// Uses the NIO byte buffer class--wrap a ByteBuffer instance around
// the data we get from the packet
byteBuffer
=
ByteBuffer
.
wrap
(
packet
.
getData
());
pdu
=
pduFactory
.
createPdu
(
byteBuffer
);
// the PduFactory will wrap data in a ByteBuffer
pdu
=
pduFactory
.
createPdu
(
packet
.
getData
());
if
(
pdu
!=
null
)
{
...
...
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