Class Notes (806,874)
Canada (492,493)
IAT 267 (14)

IAT267_Week 11.docx

8 Pages
Unlock Document

Simon Fraser University
Interactive Arts & Tech
IAT 267
Helmine Serban

TCP and UDP UDP = User Datagram Protocol TCP = Transmission Control Protocol When a developer creates a new application for the Internet, one of the first decisions that the developer must make is whether to use TCP or UDP Each of these protocols offer a different service model to the applications UDP Services Lightweight transport protocol with a minimalist service model Connectionless, no handshaking before two processes start to communicate UDP provides an unreliable data transfer service. When a process sends a message into a UDP socket, UDP provides no guarantee that the message will ever reach the receiving socket Messages that do arrive to the receiving socket may arrive out of order UDP does not include a flow control or congestion control mechanism, so a sending process can pump data into a UDP socket at any rate it pleases. Although all the data may not make it to the receiving socket, a large fraction of data may arrive Because UDP does not use acknowledgements or retransmissions that can slow down the delivery of useful real-time data, developers of real-time applications often choose to run their applications over UDP UDP provides no guarantee on delay TCP Services The TCP service model includes a connection-oriented service and a reliable data transfer service. When an application invokes TCP for its transport protocol, the application receives both of these services from TCP Connection-oriented service: TCP has the client and server exchange control information with each other before the application-level messages begin to flow. This so-called handshaking procedure (part of the TCP protocol) alerts the client and server, allowing them to prepare for a transfer of packets After the handshaking phase, a TCP connection is said to exist between the sockets and the two processes. The connection is a full-duplex connection, in that the two processes can send messages to each other over the connection at the same time When the application is finished sending messages, it must tear down the connection. The service is referred to as connection oriented (or a virtual circuit service) because the two processes are connected end to end in a very loose manner without any support from the intermediate nodes Reliable transport service-the communicating process can rely on TCP to deliver all the messages sent without error and in the proper order. When one side of the application passes a stream of bytes into a socket, it can count on TCP to deliver the same stream of data to the receiving socket, with no missing or duplicate bytes TCP includes end to end flow control mechanism, which regulates sender transmission based on the availability of receiving buffer TCP also includes a congestion control mechanism Network Programming An application can open a UDP socket or a TCP socket The TCP socket gives transport-level connection-oriented reliable byte-system service to the application The UDP socket provides transport-level connection, unreliable datagram service to the application Addressing Whenever you need to deliver something to one specific destination among many, you need an address A port number is needed to choose among multiple applications running on the destination host The destination port number is need for delivery; the source port number is needed for reply Socket Address Process to process delivery needs two identifiers, IP address and the port number at each end to make a connection The combination of an IP address and a port number is called a socket address The client socket address defines the client process uniquely, just as the server socket address defines the server process uniquely IP address + port number = socket address Socket API Socket application programming interface Networking application programming interface The socket API is the place to start when implementing a computer network application The API defines operations for -creating a socket -attaching the socket to the network -sending and receiving messages through the socket -closing the socket UDP Packets (datagrams) Have a fixed-sized header of 8 bytes The fields on the header includes -source port number: 16 bits -destination port number: 16 b
More Less

Related notes for IAT 267

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.