19. Socket Functions blocks until connection from client TCP Client TCP Server socket() listen() accept() socket() bind() Well-known port connect() write() TCP three-way handshaking data (request) read() process request
20. Socket Functions blocks until connection from client TCP Server TCP Client read() data (reply) close() read() close() socket() connect() write() TCP three-way handshaking data (request) read() process request write()
21.
22.
23.
24.
25.
26.
27.
28. TCP Connection Setup client server socket socket connect bind listen accept connect completes connection added to incomplete queue connection moved to complete queue Synchronize (SYN) J SYN K, acknowledge (ACK) J+1 ACK K+1
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43. UDP Connection Example client server socket socket sendto bind recvfrom sendto recvfrom close