图书介绍
TCP/IP网络互连 英文版 第3卷 客户/服务器编程及应用Linux/POSIX Sockets版PDF|Epub|txt|kindle电子书版本网盘下载
![TCP/IP网络互连 英文版 第3卷 客户/服务器编程及应用Linux/POSIX Sockets版](https://www.shukui.net/cover/19/31413381.jpg)
- (美)DouglasE.Comer,(美)DavidL.Stevens著 著
- 出版社: 北京:人民邮电出版社
- ISBN:7115099219
- 出版时间:2002
- 标注页数:601页
- 文件大小:20MB
- 文件页数:632页
- 主题词:
PDF下载
下载说明
TCP/IP网络互连 英文版 第3卷 客户/服务器编程及应用Linux/POSIX Sockets版PDF格式电子书版下载
下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!
(文件页数 要大于 标注页数,上中下等多册电子书除外)
注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具
图书目录
1.1 Internet Applications Using TCP/IP1
1.2 Designing Applications For ADistribuled Environment1
Chapter 1 Introduction And Overview1
1.3 Standard And Nonstandard Application Protocols2
1.4 An Example Of Standard Application Protocol Use2
1.5 An Example TELNET Connection3
1.6 Using TELNET To Access An Alternative Service4
1.7 Application Protocols And Software Flexibility5
1.9 The Remainder Of This Text6
1.8 Viewing Services From The Provider s Perspective6
1.10 Summary7
Chapter 2 The Client Server Model And Software Design9
2.1 Introduction9
2.2 Motivation10
2.3 Terminology And Concepts10
2.3.1 Clients And Servers11
2.3.2 Privilege And Complexity11
2.3.4 Parameterization Of Clients12
2.3.3 Standard Vs. Nonstandard Client Software12
2.3.5 Connectionless Vs. Connection-Oriented Servers13
2.3.6 Stateless Vs. Stateful Servers14
2.3.7 A Stateless File Server Example15
2.3.8 A Stateful File Server Example15
2.3.9 Identifying A Client16
2.3.10 Statelessness Is A Protocol Issue18
2.3.11 Servers As Clients19
2.4 Summary20
3.2 Concurrency In Networks23
Chapter 3 Concurrent Processing In Client-Server Software23
3.1 Introduction23
3.3 Concurrency In Servers25
3.4 Terminology And Concepts26
3.4.1The Process Concept26
3.4.2 Sharing Of Local And Global Variables27
3.4.3 Procedure Calls28
3.5 An Example Of Concurrent Process Creation29
3.5.1 A Sequential C Example29
3.5.2 A Concurrent Version30
3.5.3 Timeslicing31
3.5.4 Singly-Threaded Process Assumption32
3.5.5 Making Processes Diverge33
3.6 Executing New Code34
3.7 Context Switching And Protocol Software Design34
3.8 Concurrency And Asynchronous I/O35
3.9 Summary36
4.1 Introduction39
4.2 Loosely Specified Protocol Software Interface39
Chapter 4 Application Interface To Protocols39
4.2.1 Advantages And Disadvantages40
4.3 Interface Functionality40
4.4 Conceptual Interface Specification41
4.5 System Calls42
4.6 Two Basic Approaches To Network Communication43
4.7 The Basic I/O Functions Available In Linux43
4.8 Using Linux I/O With TCP/IP45
4.9 Summary45
5.2 Berkeley Sockets47
Chapter 5 The Socket API47
5.1 Introduction47
5.3 Specifying A Protocol Interface48
5.4 The Socket Abstraction49
5.4.1 Socket Descriptors And File Descriptors49
5.4.2 System Data Structures For Sockets50
5.4.3 Making A Socket Active Or Passive51
5.5 Specifying An Endpoint Address52
5.6 A Generic Address Structure52
5.7.2 The Connect Call54
5.7 Major System Calls In The Socket API54
5.7.1 The Socket Call54
5.7.3 The Send Call55
5.7.4 The Recv Call55
5.7.5 The Close Call55
5.7.6 The Bind Call56
5.7.7 The Listen Call56
5.7.8 The Accept Call56
5.7.9 Using Read And Write With Sockets56
5.7.10 Summary Of Socket Calls57
5.8 Utility Routines For Integer Conversion58
5.9 Using Socket Calls In A Program58
5.10 Symbolic Constants For Socket Call Parameters59
5.11 Summary60
Chapter 6 Algorithms And Issues In Client Software Design63
6.1 Introduction63
6.2 Learning Algorithms Instead Of Details63
6.3 Client Architecture64
6.4 Identifying The Location Of A Server64
6.5 Parsing An Address Argument66
6.6 Looking Up A Domain Name67
6.7 Looking Up A Well-Known Port By Name68
6.8 Port Numbers And Network Byte Order68
6.9 Looking Up A Protocol By Name69
6.10 The TCP Client Algorithm69
6.11 Allocating A Socket70
6.12 Choosing A Local Protocol Port Number71
6.13 A Fundamental Problem In Choosing A Local IP Address71
6.15 Communicating With The Server Using TCP72
6.14 Connecting A TCP Socket To A Server72
6.16 Receiving A Response From A TCP Connectior73
6.17 Closing A TCP Connection74
6.17.1 The Need For Partial Close74
6.17.2 A Partial Close Operation74
6.18 Programming A UDP Client75
6.19 Connected And Unconnected UDP Sockets76
6.20 Using Connect With UDP76
6.21 Communicating With A Server Using UDP76
6.24 A Warning About UDP Unreuaouuy77
6.25 Summary77
6.22 Closing A Socket That Uses UDP77
6.23 Partial Close For UDP77
Chapter 7 Example Client Software81
7.1 Introduction81
7.2 The Importance Of Small Examples81
7.3 Hiding Details82
7.4 An Example Procedure Library For Client Programs82
7.5 Implementation Of ConnectTCP83
7.6 Implementation Of ConnectUDP84
7.7 A Procedure That Forms Connections85
7.8 Using The Example Library88
7.9 The DAYTIME Service88
7.10 Implementation Of A TCP Client For DAYTIME89
7.11 Reading From A TCP Connection90
7.12 The TIME Service91
7.13 Accessing The TIME Service91
7.14 Accurate Times And Network Delays92
7.15 A UDP Client For The TIME Service92
7.17 A TCP Client For The ECHO Service94
7.16 The ECHO Service94
7.18 A UDP Client For The ECHO Service96
7.19 Summary98
Chapter 8 Algorithms And Issues In Server Software Design101
8.1 Introduction101
8.2 The Conceptual Server Algorithm101
8.3 Concurrent Vs. Iterative Servers102
8.4 Connection-Oriented Vs. Connectionless Access102
8.5.2 UDP Semantics103
8.5 Transport Protocol Semantics103
8.5.1 TCP Semantics103
8.6 Choice Of Transport104
8.7 Connection-Oriented Servers104
8.8 Connectionless Servers105
8.9 Failure, Reliability, And Statelessness106
8.10 Optimizing Stateless Servers106
8.11 Four Basic Types Of Servers109
8.12 Request Processing Time109
8.14 An Iterative, Connection-Oriented Server Algorithm110
8.13 Iterative Server Algorithms110
8.15 Binding To A Well-Known Address Using INADDR_ANY111
8.16 Placing The Socket In Passive Mode112
8.17 Accepting Connections And Using Them112
8.18 An Iterative, Connectionless Server Algorithm112
8.19 Forming A Reply Address In A Connectionless Server113
8.20 Concurrent Server Algorithms114
8.21 Master And Slaves114
8.22 A Concurrent, Connectionless Server Algorithm115
8.23 A Concurrent, Connection-Oriented Server Algorithm116
8.24 Implementations Of Server Concurrency117
8.25 Using Separate Programs As Slaves118
8.26 Apparent Concurrency Using A Single Thread118
8.27 When To Use Each Server Type119
8.28 A Summary of Server Types120
8.29 The Important Problem Of Server Deadlock121
8.30 Alternative Implementations122
8.31 Summary122
9.2 Creating A Passive Socket125
Chapter 9 Iterative, Connectionless Servers (UDP)125
9.1 Introduction125
9.3 Process Structure129
9.4 An Example TIME Server130
9.5 Summary132
Chapter 10 Iterative, Connection-Oriented Servers (TCP)135
10.1 Introduction135
10.2 Allocating A Passive TCP Socket135
10.4 Process Structure136
10.3 A Server For The DAYTIME Service136
10.5 An Example DAYTIME Server137
10.6 Closing Connections140
10.7 Connection Termination And Server Vulnerability140
10.8 Summary141
Chapter 11 Concurrent, Connection-Oriented Servers (TCP)143
11.1 Introduction143
11.2 ECHO Service143
11.4 Process Structure144
11.3 Iterative Vs. Concurrent Implementations144
11.5 An Example Concurrent ECHO Server145
11.6 Cleaning Up Errant Processes149
11.7 Summary150
Chapter 12 Using Threads For Concurrency (TCP)151
12.1 Introduction151
12.2 Overview Of Linux Threads151
12.3 Advantages Of Threads152
12.4 Disadvantages Of Threads153
12.5 Descriptors, Delay, And Exit153
12.7.1 Mutex154
12.7 Thread Coordination And Synchronization154
12.6 Thread Exit154
12.7.2 Semaphore155
12.7.3 Condition Variable155
12.8 An Example Server Using Threads156
12.9 Monitor And Control160
12.10 Summary161
13.1 Introduction163
13.2 Data-driven Processing In A Server163
Chapter 13 Single-Inread, Concurrent Servers (TCP)163
13.3 Data-Driven Processing With A Single Thread164
13.4 Process Structure Of A Single-Thread Server165
13.5 An Example Single-Thread ECHO Server166
13.6 Summary168
Chapter 14 Multiprotocol Servers (TCP, UDP)171
14.1 Introduction171
14.2 The Motivation For Reducing The Number Of Servers171
14.3 Multiprotocol Server Design172
14.4 Process Structure172
14.5 An Example Multiprotocol DAYTIME Server173
14.6 The Concept Of Shared Code177
14.7 Concurrent Multiprotocol Servers177
14.8 Summary178
Chapter 15 Multiservice Servers (TCP, UDP)179
15.1 Introduction179
15.2 Consolidating Servers179
15.3 A Connectionless, Multiservice Server Design180
15.4 A Connection-Oriented, Multiservice Server Design181
15.6 A Single-Thread, Multiservice Server Implementation182
15.5 A Concurrent, Connection-Oriented, Multiservice Server182
15.7 Invoking Separate Programs From A Multiservice Server183
15.8 Multiservice, Multiprotocol Designs185
15.9 An Example Multiservice Server185
15.10 Static and Dynamic Server Configuration192
15.11 The Super Server, Inetd193
15.12 An Example Inetd Server195
15.13 A List Of Server Variations197
15.14 Summary197
16.2 Choosing Between An Iterative And A Concurrent Design199
16.1 Introduction199
Chapter 16 Uniform, Efficient Management Of Server Concurrency199
16.3 Level Of Concurrency200
16.4 Demand-Driven Concurrency201
16.5 The Cost Of Concurrency201
16.6 Overhead And Delay202
16.7 Small Delays Can Matter202
16.8 Slave Preallocation204
16.8.1 Preallocation In Linux204
16.8.2 Preallocation In A Connection-Oriented Server205
16.8.3 Mutex, File Locking and Concurrent Calls To Accept206
16.8.4 Preallocation In A Connectionless Server207
16.8.5 Preallocation, Bursty Traffic, And NFS208
16.8.6 Preallocation On A Multiprocessor208
16.9 Delayed Slave Allocation208
16.10 The Uniform Basis For Both Techniques210
16.11 Combining Techniques210
16.12 Summary211
17.1 Introduction213
17.2 The Advantages Of Concurrency213
Chapter 17 Concurrency In Clients213
17.3 The Motivation For Exercising Control214
17.4 Concurrent Contact With Multiple Servers215
17.5 Implementing Concurrent Clients216
17.6 Single-Thread Implementations217
17.7 An Example Concurrent Client That Uses ECHO218
17.8 Execution Of The Concurrent Client222
17.9 Concurrency In The Example Code224
17.10 Summary224
18.2 Multiprotocol Environments227
Chapter 18 Tunneling At The Transport And Application Levels227
18.1 Introduction227
18.3 Mixing Network Techhotogtes229
18.4 Dynamic Circuit Allocation230
18.5 Encapsulation And Tunneling231
18.6 Tunneling Through An IP Internet232
18.7 Application-Level Tunneling Between Clients And Servers232
18.8 Tunneling, Encapsulation, And Dialup Phone Lines233
18.9 Summary234
19.2.1 The Reality Of Limited Access237
19.2 Clients And Servers In Constrained Environments237
Chapter 19 Application Level Gateways237
19.1 Introduction237
19.2.2 Computers With Limited Functionality238
19.2.3 Connectivity Constraints That Arise From Security238
19.3 Using Application Gateways238
19.4 Interoperability Through A Mail Gateway240
19.5 Implementation Of A Mail Gateway240
19.6 A Comparison Of Application Gateways And Tunneling241
19.7 Application Gateways And Limited Internet Connectivity243
19.9 Application Gateways And The Extra Hop Problem245
19.8 Application Gateways Used For Sequrity245
19.10 An Example Application Gateway247
19.11 Implementation Of An Application Gateway248
19.12 Code For The Application Gateway250
19.13 An Example Gateway Exchange251
19.14 Using Rfcd With forward Or Slocal252
19.15 A General-Purpose Application Gateway253
19.16 Operation Of SLIRP253
19.18 IP Addressing And SLIRP254
19.17 How SLIRP Handles Connections254
19.19 Summary255
Chapter 20 External Data Representation (XDR)257
20.1 Introduction257
20.2 Representations Of Data257
20.3 Asymmetric Conversion And The N-Squared Problem258
20.4 Network Standard Byte Order259
20.5 A De Facto Standard External Data Representation261
20.6 XDR Data Types261
20.9 XDR Library Routines263
20.7 Implicit Types263
20.8 Software Support For Using XDR263
20.10 Building A Message One Piece At A Time264
20.11 Conversion Routines In The XDR Library265
20.12 XDR Streams, I/O, and TCP267
20.13 Records, Record Boundaries, And Datagram I/O268
20.14 Summary268
21.1 Introduction271
21.2 Remote Procedure Call Model271
Chapter 21 Remote Procedure Call Concept (RPC)271
21.3 Two Paradigms For Building Distributed Programs272
21.4 A Conceptual Model For Conventional Prccedure Calls273
21.5 An Extension Of the Procedural Model274
21.6 Execution Of Conventional Procedure Call And Return274
21.7 The Procedural Model In Distributed System275
21.8 Analogy Between Client-Server And RPC276
21.9 Distributed Computation As A Program277
21.11 Remote Programs And Procedures278
21.10 Sun Microsystems Remote Procedure Call Definition278
21.12 Reducing The Number Of Arguments279
21.13 Identifying Remote Programs And Procedures279
21.14 Accommodating Multiple Versions Of A Remote Program280
21.15 Mutual Exclusion For Procedures In A Remote Program281
21.16 Communication Semantics282
21.17 At Least Once Semantics282
21.18 RPC Retransmission283
21.19 Mapping A Remote Program To A Protocol Port283
21.20 Dynamic Port Mapping284
21.21 RPC Port Mapper Algorithm285
21.22 ONC RPC Message Format287
21.23 Marshaling Arguments For A Remote Procedure288
21.24 Authentication288
21.25 An Example Of RPC Message Representation290
21.26 An Example Of The UNIX Authentication Field290
21.27 Summary291
Chapter 22 Distributed Program Generation (Rpegen Concept)295
22.1 Introduction295
22.2 Using Remote Procedure Calls296
22.3 Programming Mechanisms To Support RPC297
22.4 Dividing A Program Into Local And Remote Procedures298
22.5 Adding Code For RPC299
22.6 Stub Procedures299
22.7 Multiple Remote Procedures And Dispatching300
22.8 Name Of The Client-Side Stub Procedure301
22.9 Using Rpcgen To Generate Distributed Programs302
22.10 Rpcgen Output And Interface Procedures302
22.12 Using Rpcgen To Build A Client And Server304
22.11 Rpcgen Input And Output304
22.13 Summary305
Chapter 23 Distributed Program Generation (Rpcgen Example)307
23.1 Introduction307
23.2 An Example To Illustrate Rpcgen308
23.3 Dictionary Operations308
23.4 Eigth Steps To A Distributed Application309
23.5 Step 1: Build A Conventional Applicaton Program310
23.6 Step 2: Divide The Program Into Two Parts314
23.7 Step 3: Create An Rpcgen Specification320
23.8 Step 4: Run Rpcgen322
23.9 The .h File Produced By Rpcgen322
23.10 The XDR Conversion File Produced By Rpcgen325
23.11 The Client Code Produced By Rpcgen325
23.12 The Server Code Produced By Rpcgen328
23.13 Step 5: Write Stub Interface Procedures331
23.13.1 Client-Side Interface Routines331
23.13.2 Server-Side Interface Routines333
23.14 Step 6: Compile And Link The Client Program335
23.15 Step 7: Compile And Link The Server Program339
23.17 Using The Make Utility341
23.16 Step 8 : Start The Server And Execute The Client341
23.18 Summary344
Chapter 24 Network File System Concepts (NFS)347
24.1 Introduction347
24.2 Remote File Access Vs. Transfer347
24.3 Operations On Remote Files348
24.4 File Access Among Heterogeneous Computers348
24.7 Review Of The UNIX File System349
24.5 Stateless Servers349
24.6 NFS And UNIX File Semantics349
24.7.1 Basic Defintions350
24.7.2 A Byte Sequence Without Record Boundaries350
24.7.3 A File s Owner And Group Identifiers350
24.7.4 Protection And Access351
24.7.5 The Open-Read-Write-Close Paradigm352
24.7.6 Data Transfer353
24.7.7 Permission To Search A Directory353
24.7.9 Seeking Beyond The End Of File354
24.7.8 Random Access354
24.7.10 File Position And Concurrent Access355
24.7.11 Semantics Of Write During Concurrent Access*356
24.7.12 File Names And Paths356
24.7.13 Inode: Information Stored With A File357
24.7.14 Stat Operation358
24.7.15 The File Naming Mechanism359
24.7.16 File System Mounts360
24.7.17 File Name Resolution362
24.7.18 Symbolic Links363
24.8 Files Under NFS363
24.9 NFS File Types364
24.10 NFS File Modes364
24.11 NFS File Attributes365
24.12 NFS Client And Server366
24.13 NFS Client Operation367
24.14 NFS Client And UNIX Systems368
24.15 NFS Mounts369
24.17 Handles Replace Path Names370
24.16 File Handle370
24.18 File Positioning With A Stateless Server372
24.19 Operations On Directories372
24.20 Reading A Directory Statelessly372
24.21 Multiple Hierarchies In An NFS Server373
24.22 The Mount Protocol374
24.23 Transport Protocols For NFS374
24.24 Summary375
25.2 Using RPC To Define A Protocol377
25.1 Introduction377
Chapter 25 Network File System Protocols (NFS, Mount)377
25.3 Defining A Protocol With Data Structures And Procedures378
25.4 NFS Constant, Type, And Data Declarations379
25.4.1 NFS Constants379
25.4.2 NFS Typedef Declarations380
25.4.3 NFS Data Structures380
25.5 NFS Procedures383
25.6.6 NFSPROC3_READLINK (Procedure 5)385
25.6.5 NFSPROC3_ACCESS (Procedure 4)385
25.6.4 NFSPROC3_LOOKVP (Procedure 3)385
25.6.2 NFSPROC3_GETATTR (Procedure 1)385
25.6.1 NFSPROC3_NULL (Procedure 0)385
25.6 Semantics Of NFS Operations385
25.6.3 NFSPROC3_SETATTR (Procedure 2)385
25.6.7 NFSPROC3_READ (Procedure 6)386
25.6.8 NFSPROC3_WRITE (Procedure 7)386
25.6.9 NFSPROC3_CREATE (Procedure 8)386
25.6.10 NFSPROC3_MKDIR (Procedure 9)386
25.6.11 NFSPROC3_SYMLINK (Procedure 10)386
25.6.12 NFSPROC3_ MKNOD (Procedure 11)386
25.6.16 NFSPROC3_LINK (Procedure 15)387
25.6.17 NFSPROC3_READDIR (Procedure 16)387
25.6.13 NFSPROC3_REMOVE (Procedure 12)387
25.6.15 NFSPROC3_RENAME (Procedure 14)387
25.6.14 NFSPROC3_RMDIR (Procedure 13)387
25.6.18 NFSPROC3_READDIRPLUS (Procedure 17)388
25.6.19 NFSPROC3_FSSTAT (Procedure 18)388
25.6.20 NFSPROC3_FSINFO (Procedure 19)388
25.6.21 NFSPROC3_PATHCONF (Procedure 20)388
25.7.2 Mount Type Definitions389
25.7.1 Mount Constant Definitions389
25.6.22 NFSPROC3_ COMMIT (Procedure 21)389
25.7 The Mount Protocol389
25.7.3 Mount Data Structures390
25.8 Procedures In The Mount Protocol391
25.9 Semantics Of Mount Operations391
25.9.4 MOUNTPROC3_UMNT(Procedure 3)392
25.9.6 MOUNTPROC3_EXPORT(Procedure 5)392
25.9.5 MOUNTPROC3_UMNTALL(Procedure 4)392
25.9.3 MOUNTPROC3_DUMP(Procedure 2)392
25.9.2 MOUNTPROC3_MNT(Procedure 1)392
25.9.1 MOUNTPROC3_NULL(Procedure 0)392
25.10 NFS And Mount Authentication393
25.11 File Locking394
25.12 Changes In NFS Between Versions 3 And 4394
25.13 Summary395
Chapter 26 A TELNET Client (Program Structure)397
26.1 Introduction397
26.2.3 Terminals, Windows, and Files398
26.2.2 Command And Control Information398
26.2.1 The User s Terminal398
26.2 Overview398
26.2.4 The Need For Concurrency399
26.2.5 A Process Model For A TELNET Client400
26.3 A TELNET Client Algorithm400
26.4 Terminal I/O In Linux401
26.4.1 Controlling A Device Driver402
26.5 Establishing Terminal Modes403
26.6 Global Variable Used For Stored State405
26.7 Restoring Terminal Modes Before Exit406
26.8 Client Suspension And Resumption407
26.9 Finite State Machine Specification408
26.10 Embedding Commands In A TELNET Data Stream409
26.11 Option Negotiation410
26.12 Request/Offer Symmetry410
26.13 TELNET Character Definitions411
26.14 A Finite State Machine For Data From The Server412
26.15 Transitions Among States413
26.17 A Compact FSM Representation415
26.16 A Finite State Machine Implementation415
26.18 Keeping The Compact Representation At Run-Time417
26.19 Implementation Of A Compact Representation417
26.20 Building An FSM Transition Matrix419
26.21 The Socket Output Finite State Machine421
26.22 Definitions For The Socket Output FSM423
26.23 The Option Subnegotiation Finite State Machine424
26.24 Definitions For The Option Subnegotiation FSM425
26.25 FSM Initialization426
26.26 Arguments For The TELNET Client427
26.27 The Heart Of The TELNET Client428
26.28 Implementation Of The Main FSM432
26.29 Summary433
Chapter 27 A TELNET Client (Implementation Details)435
27.1 Introduction435
27.2 The FSM Action Procedures435
27.3 Recording The Type Of An Option Request436
27.4 Performing No Operation437
27.5 Responding To WILL/WONT For The Echo Option437
27.7 Responding To WILL/WONT For The No Go-Ahead Option439
27.6 Responding To WILL/WONT For Unsupported Options439
27.8 Generating DO/DONT For Binary Transmission441
27.9 Responding To DO/DONT For Unsupported Options442
27.10 Responding To DO/DONT For Transmit Binary Option442
27.11 Responding To DO/DONT For The Terminal Type Option444
27.12 Option Subnegotiation445
27.13 Sending Terminal Type Information446
27.14 Terminating Subnegotiation448
27.15 Sending A Character To The Server448
27.16 Displaying Incoming Data On The User s Terminal450
27.17 Using Termcap To Control The User s Terminal453
27.18 Writing A Block Of Data To The Server455
27.19 Interacting With The Client Process456
27.20 Responding To Illegal Commands456
27.21 Scripting To A File457
27.22 Implementation Of Scripting457
27.23 Initialization Of Scripting458
27.24 Collecting Characters Of The Script File Name459
27.25 Opening A Script File460
27.26 Terminating Scripting462
27.27 Printing Status Information463
27.28 Summary464
Chapter 28 Streaming Audio And Video Transport (RTP Concept And Design)467
28.1 Introduction467
28.2 Streaming Service467
28.3 Real-Time Delivery468
28.4 Protocol Compensation For Jitter468
28.5 Retransmission, Loss, And Recovery469
28.6 Real-Time Transport Protocol470
28.8 Delayed Playback And Jitter Buffers471
28.7 Stream Translation And Mixing471
28.9 RTP Control Protocol (RTCP)472
28.10 Synchronizing Multiple Sireams474
28.11 RTP Transport And Many-To-Many Transmission475
28.12 Sessions, Streams, Protocol Ports, And Demultiplexing476
28.13 Basic Approaches To Encoding477
28.14 Conceptual Organization Of RTP Software478
28.15 Process/Thread Structure479
28.16 Semantics Of The API481
28.17 Jitter Buffer Design And Rebuffering482
28.18 Event Handling483
28.19 Playback Anomaly And Timestamp Complications483
28.20 Size Of An Example Real-Time Library484
28.21 An Example MP3 Player484
28.22 Summary485
Chapter 29 Streaming Audio And Video Transport (Example RTP Implementation)487
29.1 Introduction487
29.2 An Integrated Implementation487
29.4 RTP Definitions488
29.3 Program Architecture488
29.5 Manipulation Of Time Values492
29.6 RTP Sequence Space Processing493
29.7 RTP Packet Queue Manipulation494
29.8 RTP Input Processing496
29.9 Keeping Statistics For RTCP499
29.10 RTP Initialization500
29.11 RTCP Definitions504
29.12 Receiving RTCP Sender Reports506
29.13 Generating RTCP Receiver Reports507
29.14 RTCP Header Creation509
29.15 RTCP Delay Computation510
29.16 Coneration Of An RTCP Bye Message511
29.17 Size Of An Integrated Implementation511
29.18 Summary512
Chapter 30 Practical Hints And Techniques For Linux Servers515
30.1 Introduction515
30.2 Operating In Background515
30.3 Programming A Server To Operate In Background516
30.4 Open Descriptors And Inheritance517
30.6 Signals From The Controlling TTY518
30.5 Programming A Server To Close Inherited Descriptors518
30.7 Programming A Server To Change Its Controlling TTY519
30.8 Moving To A Safe And Known Directory519
30.9 Programming A Server To Change Directories520
30.10 The Linux Umask520
30.11 Programming A Server To Set Its Umask521
30.12 Process Groups521
30.13 Programming A Server To Set Its Process Group521
30.16 Mutual Exclusion For The Server522
30.14 Descriptors For Standard I/O522
30.15 Programming A Server To Open Standard Descriptors522
30.17 Programming A Server To Avoid Multiple Copies523
30.18 Recording A Server s Process ID524
30.19 Programming A Server To Record Its Process ID524
30.20 Waiting For A Child Process To Exit524
30.23 Programming A Server To Ignore Extraneous Signals525
30.24.1 Generating Log Messages525
30.24 Using A System Log Facility525
30.22 Extraneous Signals525
30.21 Programming A Server To Wait For Each Child To Exit525
30.24.2 The Advantage Of Indirection And Standard Error526
30.24.3 Limitations Of I/O Redirection527
30.24.4 A Client-Server Solution527
30.24.5 The Syslog Mechanism528
30.24.6 Syslog Message Classes528
30.24.7 Syslog Facilities528
30.24.8 Syslog Priority Levels529
30.24.9 Using Syslog529
30.24.10 An Example Syslog Configuration File530
30.25 Sumary531
Chapter 31 Deadlock And Starvation In Client-Server Systems533
31.1 Introduction533
31.2 Definition Of Deadlock534
31.3 Difficulty Of Deadlock Detection534
31.4 Deadlock Avoidance535
31.5 Deadlock Between A Client And Server535
31.6 Avoiding Deadlock In A Single Interaction536
31.7 Starvation Among A Set Of Clients And A Server536
31.8 Busy Connections And Starvation537
31.9 Avoiding Blocking Operations538
31.10 Processes, Connections, And Other Limits538
31.11 Cycles Of Clients And Servers539
31.12 Documenting Dependencies540
31.13 Summary540
Appendix 1 System Calls And Library Routines Used With Sockets543
Appendix 2 Manipulation Of Linux File And Socket Descriptors573
Bibliography577
Index585