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
ccd8aebf
Commit
ccd8aebf
authored
5 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
put loopsize parameter where it is easily recognized and modified
parent
a5b9a919
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
examples/src/UdpMulticastHttpExamples/MulticastSender.java
+3
-2
3 additions, 2 deletions
examples/src/UdpMulticastHttpExamples/MulticastSender.java
with
3 additions
and
2 deletions
examples/src/UdpMulticastHttpExamples/MulticastSender.java
+
3
−
2
View file @
ccd8aebf
...
@@ -19,8 +19,11 @@ public class MulticastSender {
...
@@ -19,8 +19,11 @@ public class MulticastSender {
public
static
final
String
MULTICAST_ADDRESS
=
"239.1.2.15"
;
// within reserved multicast address range
public
static
final
String
MULTICAST_ADDRESS
=
"239.1.2.15"
;
// within reserved multicast address range
public
static
final
int
DESTINATION_PORT
=
1718
;
public
static
final
int
DESTINATION_PORT
=
1718
;
/** Time to live: how many router-decrement levels can be crossed */
/** Time to live: how many router-decrement levels can be crossed */
public
static
final
int
TTL
=
10
;
public
static
final
int
TTL
=
10
;
public
static
final
int
loopSize
=
20
;
// 20000
public
static
final
String
QUIT_SENTINEL
=
"QUIT QUIT QUIT!"
;
public
static
final
String
QUIT_SENTINEL
=
"QUIT QUIT QUIT!"
;
...
@@ -46,10 +49,8 @@ public class MulticastSender {
...
@@ -46,10 +49,8 @@ public class MulticastSender {
multicastSocket
.
joinGroup
(
multicastAddress
);
multicastSocket
.
joinGroup
(
multicastAddress
);
// You can join multiple groups here
// You can join multiple groups here
int
loopSize
=
20
;
for
(
int
index
=
0
;
index
<
loopSize
;
index
++)
for
(
int
index
=
0
;
index
<
loopSize
;
index
++)
{
{
// Put together a message with binary content. "ByteArrayOutputStream"
// Put together a message with binary content. "ByteArrayOutputStream"
// is a java.io utility that lets us put together an array of binary
// is a java.io utility that lets us put together an array of binary
// data, which we put into the UDP packet.
// data, which we put into the UDP packet.
...
...
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