Worksheet: J7
Worksheets are self-guided activities that reinforce lectures. They are not graded for accuracy, only for completion. They are due, on github by 11:59pm on the day of the lecture.
Create a new repo using all the steps in Lab 0 called yourgitusername-worksheet-J7
. Submit a file called worksheet-J7.md
in your repo for this assignment.
Questions
-
What is inside a packet?
-
What is the purpose of an internet layer in the TCP/IP protocol? What do you, as a client, need to specify in this protocol?
-
What is the purpose of the transport layer in the TCP/IP protocol? What do you, as a client, need to specify in this protocol?
-
What is the difference between SMTP and HTTP?
-
What is the difference between an IP address and a domain name?
-
How does the operating system use ports?
-
Write code that creates a socket connection to ip address
123.45.678.900
at port4040
. Then, print a color to that socket’s output. -
What is the difference between a socket’s input stream and its output stream?
-
What is the difference between a
Socket
and aSocketServer
? -
How are threads useful with servers? How does a server manage to always be listening for sockets trying to connect?