Advanced udp sockets, focusing on reliable communication techniques such as flow control and error control. Topics include timeouts, sequence numbers, and unix domain protocols. Code examples for primitive udp sender and receiver, flow control through delay and handshaking, timeouts, and sequence numbers.
Download UDP Sockets: Reliable Communication and Flow Control and more Slides Computer Programming in PDF only on Docsity!
Week 10 Topics
Advanced UDP sockets
Reliable communication over UDP
Time out
Sequence numbers
Unix domain protocols
Address structure
Client-server
socketpair
Reliable communication over UDP
Flow control
Error control
Time out
example1b.c and example2a.c resolve the flow control problem - What will happen if some packet gets lost? - example1b.c and example2b.c - Solution - Add timeout to the sender - If a packet gets lost, the sender should timeout and resend the packet - How can we implement a timeout? - See example1c.c and example2b.c
Sequence numbers
Problems with example1c.c and example2b.c - Some packets get duplicated - How can we resolve this problem? - The receiver must be able to recognize whether it has received a packet - It should discard the duplicate - How can we accomplish this? - Add an identifier to each packet sent – a sequence number - The receiver should record sequence numbers that is has received » example1d.c and example2c.c implement this