Network Programming (Lecture 1) (Introduction)
Network Programming (Lecture 1) (Introduction)
(Lecture 1)
(Introduction)
Fluency in C Programming
Data structures and algorithms
Computer Networks
Required
2
Assignments 10%
Quizzes 10%
Midterm exam 25%
Lab Project 15%
Final exam 40%
Grading Policy
3
Text Books
Unix Network Programming, Volume 1 ,Third Edition
o W. Richard Stevens ,Bill Fenner ,Andrew M. Rudoff
Unix Network Programming, Volume 2 ,Second Edition
o W. Richard Stevens
Advanced Programming in UNIX Environment, Second
Edition
o W. Richard Stevens, Stephen A. Rago
The Definitive Guide to Linux Network Programming
o Keir Davis, John W. Turner, Nathan Yocom
4
Course outlines
Introduction
TCP/IP
The transport layer(TCP and UDP)
Sockets?
TCP sockets
UDP sockets
Advanced sockets(RAW)
SIGNALS
Routing sockets
Broadcasting/Multicasting
I/O blocking and multiplexing
Multithreading
Inter process communication
Practical implementation of all ..
Etc
Client Server Model
Web browser communicating with web server
FTP client fetching a file from FTP server
Telnet used to log in to remote host using Telnet server on that remote
host
Client
Server
Communication Link
6
Application Protocol
Multiple Clients
Client
Server
Communication Link
Client
Client
..
..
7
Sockets
In computer networking, an Internet socket or
network socket is an endpoint of a bidirectional
inter-process communication flow across an
Internet Protocol-based computer network, such
as the Internet.
Some concepts:
Entity (process/hardware/system
calls)
Protocol: How peer entities
interact with each other.
Service interface: How upper
layer entities interact with lower
layer entities.
Socket Programming: the use of
TCP and UDP.
TCP: Transmission control
protocol.
connection-oriented, reliable,
full duplex, byte stream service
Interface: socket, bind, listen,
accept, connect, read, write,
close.
An analogy:
Socket: telephone
Bind: assign telephone number to a
telephone
Listen: turn on the ringer so that
you can hear the phone call
Connect: dial a phone number
Accept: answer the phone
Read/write: talking
Close: ???