For TCP data is streamed and broken up into packets
Data can be lost in UDP
Packets have addresses in them that are used to indicate where the packet is delivered
Learning Outcomes
Explain what the role of an IP address is in a computer network.
Explain what the role of a port number is in a computer network.
Write a Java program that talks to Google.com
Write a Java program that can make a TCP connection
Write a Java program that can accept a TCP connection
Write a Java program that can send and receive data on an established TCP connection
Enumerate and explain the different type of network related errors a program using/establishing a TCP connection might encounter and why/how they might be caused (e.g. connection not accepted, connection times out, connection failure during transfer
Compare and contrast the properties of a TCP vs UDP "connection."
Something about XDR and the relationship
Lesson Plan
Lecture 1
Pre class Activities
Video discussing the construction of code to send a UDP packet
Video Discussing the construction of code to receive a UDP packet. Sample video: ReceiveUDPPacketJava.m4v
In Class Activities
Student groups assigned to be either the client or the server and then they have to exchange data between each other. First they send character data, then they go to numbers
Have to interact with a provided server that does things in binary
What happens when a packet arrives that is too large for the receiving buffer. Have students enumerate the possible outcomes and propose a way of determining what actually happens.
Invention activity for XDR
After Class Activities
Lecture 2
Pre-class Activities
Video discussing the construction of code to make a TCP connection
Video discussing the construction of code to accept a TCP connection
Beej's Guide to Network Programming The perspective is primarily from C, but it does provide a decent overview of program structure and what needs to be done.