Week9-Sockets - 1 Communication Sockets(Haviland – Ch 10...

Info iconThis preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Communication Sockets (Haviland – Ch. 10) 2 Simple Web Request Karen’s Home Page - Courses -kites 3 The request • How do we tell the server what we want? • How do we even find the server? • How do the server and browser talk to each other? 4 HTTP Request GET / HTTP/1.1 Connection: Keep-Alive Host:www.tkf.toronto.on.ca request HTTP/1.1 301 Moved Permanently Date: Tues, 23 July 2002 Server: Apache/1.3.22(unix) Content-Type: text/html reply 5 How do we find the server? • Every computer on the Internet has an Internet address. • Called an IP address (Internet Protocol) • An IP address is 4 numbers separated by dots. www.tkf.toronto.on.ca = 207.245.2.3 6 Domain Name Servers browser local name server root name server “ca” name server “on” name server “toronto” name server www.tkf. toronto.on.ca? ca server on server toronto server 207.245.2.3 207.245.2.3 www.tkf. toronto.on.ca? www.tkf. toronto.on.ca? www.tkf. toronto.on.ca? www.tkf. toronto.on.ca? 7 This is getting complicated! browser local name server root name server “ca” name server “on” name server “toronto” name server server Number of messages? 10-12 8 Actually, it’s worse than that • The web page for www.tkf.toronto.on.ca doesn’t really live at 207.245.2.3 • So we need to go look up www.kites.org GET / HTTP/1.1 Connection: Keep-Alive Host:www.tkf.toronto.on.ca request HTTP/1.1 301 Moved Permanently Date: Tues, 23 July 2002 Server: Apache/1.3.22(unix) Location: http://www.kites.org Content-Type: text/html reply 9 Now what? • Okay, we have the address. • What do we do with it? • Let’s look at how two computers communicate. • HTTP is a high-level protocol • HTTP is specific to the web. • Computers communicate for other reasons. 10 Protocols • Computers use several layers of general protocols to communicate. • To understand why these layers are important, think about how a company sends you an invoice for a purchase. 11 Protocols Invoice: Customer: Karen Reid Order No: 5379 Qty: Unit Price Total 1 Athalon 219.00 219.00 2 128 MB 149.95 299.90 Subtotal 518.90 Tax 77.84 TOTAL 596.74 Karen Reid Feb 18, 2001 Payable to: CPUS are us $596.74 Five hundred ninety six 74/100 ____________ CPUS are us Karen Reid Dept. of Computer Science University of Toronto Karen Reid CPUS are us 0 College Street Toronto Ontario M5S 3G4 We deliver! Courier 12 TCP/IP • Transmission Control Protocol. • Tells us how to package up the data. source address dest. address bytes ack port data 13 3-way handshake SYN Here’s some data Got it TCP Connection Hi 24.197.0.67 Connection port 80? Hi 128.100.27.9 Let’s talk okay Send me a file Here’s some more Got it I’m done I’m done too ack ack fin fin 14 TCP: Three-way handshake client server socket connect (blocks) connect returns socket,bind,listen accept(blocks) accept returns SYN J SYN K, ack J+1 ack K+1 sequence number = J sequence number = K...
View Full Document

This document was uploaded on 08/02/2011.

Page1 / 44

Week9-Sockets - 1 Communication Sockets(Haviland – Ch 10...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online