lect-02 - Introduction to Unix Network Programming...

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

View Full Document Right Arrow Icon
CS/ECE 438 1 Introduction to Unix Network Programming Reference: Stevens Unix Network Programming
Background image of page 1

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

View Full Document Right Arrow Icon
CS/ECE 438 2 Internet Protocols Modem ATM FDDI Ethernet IP Network TCP UDP FTP TFTP NV HTTP Application Layers Physical Data Link Transport
Background image of page 2
CS/ECE 438 3 Direction and Principles Physical Transport Data Link Network Programming learn to use Internet for communication (with focus on implementation of networking concepts) Principles and Concepts learn to build network from ground up
Background image of page 3

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

View Full Document Right Arrow Icon
CS/ECE 438 4 Sockets process TCP with buffers, variables socket host or server process TCP with buffers, variables socket host or server Internet controlled by app developer ± process sends/receives messages to/from its socket ± socket analogous to door { sending process shoves message out door { sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process
Background image of page 4
CS/ECE 438 5 Network Programming with Sockets ± Sockets API: { A transport layer service interface ± Introduced in 1981 by BSD 4.1 ± Implemented as library and/or system calls ± Similar interfaces to TCP and UDP ± Can also serve as interface to IP (for super-user); known as “raw sockets”
Background image of page 5

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

View Full Document Right Arrow Icon
CS/ECE 438 6 Outline ± Client-Sever Model ± TCP/UDP Overview ± Addresses and Data ± Sockets API ± Example
Background image of page 6
CS/ECE 438 7 Client-Server Model ± Asymmetric Communication { Client sends requests { Server sends replies ± Server/Daemon { Well-known name (e.g., IP address + port) { Waits for contact { Processes requests, sends replies ± Client { Initiates contact { Waits for response Client Server Client Client Client
Background image of page 7

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

View Full Document Right Arrow Icon
CS/ECE 438 8 Sequential Service Client process Server process Client socket 3-way handshaking Listening socket Connection socket
Background image of page 8
CS/ECE 438 9 Concurrent Service Client process Server process Client socket 3-way handshaking Listening socket Connection socket Listening socket Connection socket
Background image of page 9

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

View Full Document Right Arrow Icon
CS/ECE 438 10 Client-Server Communication Model ± Service Model { Concurrent: ± Server processes multiple clients’ requests simultaneously { Sequential: ± Server processes only one client’s requests at a time { Hybrid: ± Server maintains multiple connections, but processes responses sequentially ± Client and server categories are not disjoint { A server can be a client of another server { A server can be a client of its own client
Background image of page 10
CS/ECE 438 11 TCP Connections ± Transmission Control Protocol (TCP) Service { OSI Transport Layer { Service Model ± Reliable byte stream (interpreted by application) ± 16-bit port space allows multiple connections on a single host ± Connection-oriented { Set up connection before communicating { Tear down connection when done
Background image of page 11

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

View Full Document Right Arrow Icon
CS/ECE 438 12 TCP Service ± Reliable Data Transfer { Guarantees delivery of all data { Exactly once if no catastrophic failures ± Sequenced Data Transfer { Guarantees in-order delivery of data { If A sends M1 followed by M2 to B, B never receives M2 before M1 ± Regulated Data Flow { Monitors network and adjusts transmission appropriately
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 72

lect-02 - Introduction to Unix Network Programming...

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

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