Network Programming

Topics Slides
Introduction to Socket Programming
Definition of sockets, UNIX socket APIs for C
Creating an Echo Server & communicating using telnet
day 1
(PDF, ~500KB)
Displaying Client's IP and Port
Designing a Client
Sending an Integer over a Socket
Handling Multiple Clients
day 2
(PDF, ~450KB)
Dealing with Partial Sends
Monitoring Multiple Sockets using poll() API
Sending Data to Multiple Hosts: Broadcast vs Multicast
day 3
(PDF, ~500KB)
Introduction to Remote Procedure Calls
RPC Application Development using rpcgen compiler
A small example: adding an integer pair using RPC
Another example: summing an array over RPC
day 4
(PDF, ~550KB)

Codes

codes
(webage)

Few Sample Questions

questions
(PDF, ~150KB)

Exam Paper

question paper
(PDF, ~200KB)

External Resources

UNIX Network Programming [book] by W. Richard Stevens
Beej's Guide to Network Programming: Using Internet Sockets [webpage]

C Socket Programming: Simple Server and Client [github]
Echo server and client using sockets in c [webpage]

Multicast Sockets [docs (webpage)] [docs (webpage)] [Tips (webpage)] [Sample code]

Socket Programming (using Python) [webpage]
Socket Programming HOWTO (Python official documentation) [webpage]
Socket Programming in Python [webpage]

Introduction to RPC [pdf] [webpage]
Introduction to RPC: a step-by-step guide [webpage]
Overview of RPC [webpage]
Writing Remote Procedural Calls [webpage]
Oracle rpcgen Guide [webpage]
Detailed Overview of RPC [pdf]
RPC vs Socket [stackoverflow]
Creative Commons License
This webpage and all linked resources are licensed under a Creative Commons Attribution 4.0 International License.