Worksheet: J6 | CS 2113 Software Engineering - Spring 2023

Worksheet: J6

Worksheets are self-guided activities that reinforce lectures. They are not graded for accuracy, only for completion. Worksheets are due by Sunday night before the next lecture.

Questions

  1. What is inside a packet?

    Reveal Solution

  2. 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?

    Reveal Solution

  3. 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?

    Reveal Solution

  4. What is the difference between SMTP and HTTP?

    Reveal Solution

  5. What is the difference between an IP address and a domain name?

    Reveal Solution

  6. How does the operating system use ports?

    Reveal Solution

  7. Write code that creates a socket connection to ip address 123.45.678.900 at port 4040. Then, print a color to that socket’s output.

    Reveal Solution

  8. What is the difference between a socket’s input stream and its output stream?

    Reveal Solution

  9. What is the difference between a Socket and a SocketServer?

    Reveal Solution

  10. How are threads useful with servers? How does a server manage to always be listening for sockets trying to connect?

    Reveal Solution