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
6e1cb623
Commit
6e1cb623
authored
5 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
parameterize host address
parent
67a1448f
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/UdpMulticastHttpExamples/HttpWebPageSource.java
+5
-3
5 additions, 3 deletions
examples/src/UdpMulticastHttpExamples/HttpWebPageSource.java
with
5 additions
and
3 deletions
examples/src/UdpMulticastHttpExamples/HttpWebPageSource.java
+
5
−
3
View file @
6e1cb623
...
@@ -23,9 +23,11 @@ public class HttpWebPageSource {
...
@@ -23,9 +23,11 @@ public class HttpWebPageSource {
System
.
out
.
println
(
"Reference: https://tools.ietf.org/html/rfc7230"
);
System
.
out
.
println
(
"Reference: https://tools.ietf.org/html/rfc7230"
);
System
.
out
.
println
();
System
.
out
.
println
();
// We request an IP to connect to a web server running on port 80.
// We request an IP to connect to a web server running on
default http
port 80.
Socket
socket
=
new
Socket
(
"www.MovesInstitute.org"
,
80
);
String
WEB_ADDRESS
=
"www.nps.edu"
;
System
.
out
.
println
(
"New socket WEB_ADDRESS="
+
WEB_ADDRESS
);
Socket
socket
=
new
Socket
(
WEB_ADDRESS
,
80
);
// compare alternative: https on port 443
// we send a command to the web server, asking for what
// we send a command to the web server, asking for what
// we want. Note that the format for the command is very
// we want. Note that the format for the command is very
...
@@ -34,7 +36,7 @@ public class HttpWebPageSource {
...
@@ -34,7 +36,7 @@ public class HttpWebPageSource {
PrintStream
ps
=
new
PrintStream
(
os
);
PrintStream
ps
=
new
PrintStream
(
os
);
String
message
=
"GET /index.html HTTP/1.0"
;
String
message
=
"GET /index.html HTTP/1.0"
;
ps
.
print
(
message
);
ps
.
print
(
message
);
// to socket
System
.
out
.
println
(
message
);
System
.
out
.
println
(
message
);
System
.
out
.
println
();
System
.
out
.
println
();
...
...
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