Image goes here
Socket Programming Introduction
CptS/EE 455 - Computer Communication Networks - Fall 2016
Washington State University

Introduction to Socket Programming

Before we can talk about socket programming we have to leap ahead a bit and talk about the network and transport layers briefly (we'll come back to these with more detail about how they work later).

Recall that the network layer is responsible for delivery of packets from one host to another across potentially many, interconnected links. The network layer has implementation components in the end points as well as in routers that connect links.

The transport layer on the other hand is implemented only in the end points and concerns itself with packet ordering, reliable delivery, and addressing within the end point.

In the Internet family of protocols the network layer protocol is the Internet Protocol (IP). IP provides a best effort datagram service: each packet is addressed to a host and the network tries to deliver each packet, but if it fails the packets simply disappear.

The main two transport protcols in the internet family are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). UDP adds the idea of port numbers to IP for addressing individual applications on an end point as well as checksums for data integrity. Otherwise UDP adopts IP's best effort datagram service model. TCP provides a reliable byte-stream service that uses sequence numbering and retransmission to ensure that data are reliably delivered in the same order that they were sent. TCP recovers from losses, duplications, and reorderings that may occur in the IP layer.

Strong suggestion: get the code for the TCP Echo Client and Server for Chapter 2 from the book website and make sure that you can make them work.

Notes for the slides:

The socket layer is an interface, not a protocol.

(c) 2004-2006 Carl H. Hauser           E-mail questions or comments to Prof. Carl Hauser