Network Programming

Topics Slides
Introduction to Network Sockets
Definition of sockets
Some background: command-line arguments, I/O using system calls
Communicating with an Echo Serever using telnet
day 1
(PDF, ~550KB)
Designing the Echo Server
Designing a Client
Passing integer over a socket: writing device independent codes
Some odds and ends: data serialization, multi-client communication, multicasting
day 2
(PDF, ~550KB)
Simulating stop-and-wait protocol
Introducing delay using sleep()
Monitoring FDs for I/O events using select()
Deterministic and randomized frame loss
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

practice problems
(PDF, ~200KB)
ns-3 Experiment
(TA: Souvik Deb)
Guide (webage)
Experiment (ns-3 code)
Trace Analysis (python script)

Exam Paper

question paper
(PDF, ~200KB)



External Resources

Previous Iteration (course webpage of 2022) [webpage]

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 repo]
Echo server and client using sockets in c [webpage]

Serialization of complex data [stackoverflow discussion (webpage)] [Google's Protocol Buffers Examples (webpage)]

Multi-client Communication [some pointers and last year's slide]

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]

ns-3 Tutorials [official tutorial (webpage)] [official documentation (webpage)]
Some Introductory Materials on ns-3 [pdf] [pdf] [YouTube]
Creative Commons License
This webpage and all linked resources are licensed under a Creative Commons Attribution 4.0 International License.