ch25 5th
ch25 5th
Introduction
To
Application
Layer
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 25: Outline
25.1 INTRODUCTION
25.4
25.25.1 Providing Services
25.5
25.25.2 Application-Layer Paradigms
25.7
Figure 25.3: Example of a peer-to-peer paradigm
25.8
25-2 CLIENT-SERVER PROGRAMMING
25.10
Figure 25.4: Position of the socket interface
25.11
Figure 25.5: A Sockets used like other sources and
sinks
25.12
Figure 25.6: Use of sockets in process-to-process
communication
25.13
Figure 25.7: A socket address
25.14
25.2.2 Using Transport Layer
25.15
25.2.3 Iterative Using UDP
25.16
Figure 25.8: Sockets for UDP communication
25.17
Figure 25.9: Flow diagram for iterative UDP
communication
25.18
25.2.4 Iterative Using TCP
25.19
Figure 25.10: Sockets used in TCP communication
2
Create
5
Create
25.20
Figure 25.11: Flow diagram for iterative TCP
communication
25.21
25.2.5 Concurrent Communication
25.22
25-3 ITERATIVE PROGRAMMING IN C
25.23
25.3.1 General Issues
25.24
Figure 25.12: Socket data structure
25.25
Header Files
25.26
25.3.2 Iter. Programs Using UDP
25.27
Table 25.1: Echo server program using UDP
25.28
Table 25.1: Echo server program using UDP
(continued)
25.29
Table 25.2: Echo client program using UDP
25.30
Table 25.2: Echo client program using UDP
(continued)
25.31
25.3.3 Iter. Programming Using TCP
25.32
Figure 25.13: Flow diagram for data-transfer boxes
25.33
Figure 25.14: Buffer used for receiving
25.34
Table 25.3: Echo server program using TCP (part I)
25.35
Table 25.3: Echo server program using TCP (part II)
25.36
Table 25.3: Echo server program using TCP (part III)
25.37
Table 25.4: Echo client program using TCP (Part I)
25.38
Table 25.4: Echo client program using TCP (Part II)
25.39
Table 25.4: Echo server program using TCP (Part III)
25.40