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
507d6601
Commit
507d6601
authored
7 months ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
comment
parent
952b330a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/src/UdpExamples/MulticastUdpSender.java
+2
-1
2 additions, 1 deletion
examples/src/UdpExamples/MulticastUdpSender.java
with
2 additions
and
1 deletion
examples/src/UdpExamples/MulticastUdpSender.java
+
2
−
1
View file @
507d6601
...
...
@@ -82,7 +82,7 @@ public class MulticastUdpSender
group
=
new
InetSocketAddress
(
multicastAddress
,
DESTINATION_PORT
);
// Join group useful on receiving side
multicastSocket
.
joinGroup
(
group
,
ni
=
DisThreadedNetworkInterface
.
findIpv4Interface
());
multicastSocket
.
joinGroup
(
group
,
ni
=
DisThreadedNetworkInterface
.
findIpv4Interface
());
// utility function
// You can join multiple groups here
byte
[]
buffer
=
baos
.
toByteArray
();
...
...
@@ -96,6 +96,7 @@ public class MulticastUdpSender
// Put together an updated packet to send
dos
.
writeChars
(
"From "
+
System
.
getProperty
(
"user.name"
)
+
": "
);
dos
.
writeChars
(
"MulticastSender packet "
+
Integer
.
toString
(
index
)
+
";"
);
// string chars for readability
// semicolon as message terminator prior to numbers
dos
.
writeInt
(
index
);
// arbitrary data, needs Java or byte-alignment to read
dos
.
writeFloat
(
17.0f
);
// arbitrary data, needs Java or byte-alignment to read
dos
.
writeFloat
(
23.0f
);
// arbitrary data, needs Java or byte-alignment to read
...
...
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