References for Lab 5
- RPI Sockets Tutorial
A very good introductory tutorial on socket programming for
beginners. Presents example TCP client and TCP server code and
provides detailed line-by-line explanations. Also presents UDP server
and client code, and explains differences in programming styles
between TCP and UDP.
- Beej's
Guide to Network Programming
Presents introductory concepts in socket programming in a very
informal and friendly vein. Provides a list of system calls and
explains each. Also presents sample server and client code, and
presents a simple example of the select system call.
- Using TCP through sockets (from MIT)
(
pdf,
ps
)
Explains basic system
calls used in creating TCP clients and servers. Explains the select
call. Provides example client and server code. Warning: some of the
code is quite involved and you may want to skip it.
-
An Advanced 4.3BSD Interprocess Communication Tutorial
(
pdf,
ps
)
More of a detailed reference. Section 0.8, pages 8-10 contain a good
explanation of select along with simple example code.
-
An Introductory 4.4 BSD Interprocess Communication Tutorial
(
pdf,
ps
)
Includes example code for a simple TCP and UDP server and client. There are a lot of sections you might want to skip.
- Man pages.
Remember to check the man pages for precise syntax,
return values and include files.
-
"Unix Network Programming. Networking APIs: Socket and XTI (Volume 1)" ,
W. Richard Stevens, Prentice Hall.
An excellent reference that covers materials from
introductory concepts suitable for a beginner to
more advanced concepts for real network programming experts.
Collected by Sanjay Rao (sanjay@cs). Modified by Jun Gao (jungao@cs) on
4/17/2000.