基本信息 书名:UNIX网络编程 卷1:套接字联网API 定价:129元 作者:(美)史蒂文斯,(美)芬纳,(症状)鲁道夫 著 出版社:人民邮电出版社 出版日期:2009-11-01 ISBN:9787115215093 字数:1215000 页码:991 版次:1 装帧:平装 开本:16开 商品重量: 编辑推荐 这是一部传世之作!网络编程专家Bill Fenner和Andrew M.Rudooff应邀执笔,对W.Richard Stevens的经典作品进行修订。书中吸纳了近几年网络技术的发展。增添了IPv6、SCTP协议和密钥管理套接字等内容,深入讨论了的关键标准、实现和技术。 书中的所有示例都是在UNIX系统上测试通过的真实的、可运行的代码,继承了Stevens一直强调的理念:“学习网络编程的方法就是下载这些程序,对其进行修改和改进。只有这样实际编写代码才能深入理解有关概念和方法。”读者可以从图灵网站本书网页下载这些示例的源代码。 内容提要 本书是一部UNIX网络编程的经典之作。书中全面深入地介绍了如何使用套接字API进行网络编程。全书不但介绍了基本编程内容,还涵盖了与套接字编程相关的高级主题,对于客户/服务器程序的各种设计方法也作了完整的探讨,最后还深入分析了流这种设备驱动机制。 本书内容详尽且具性,几乎每章都提供精选的习题,并提供了部分习题的答案,是网络研究和开发人员理想的参考书。 目录 Part 1 Introduction and TCP/IP 简介和TCP/IP Chapter 1 Introduction 简介 1.1 Introduction 概述 1.2 A Simple Daytime Client 一个简单的时间获取客户程序 1.3 Protocol Independence 协议无关性 1.4 Error Handling: Wrapper Functions 错误处理:包装函数 1.5 A Simple Daytime Server 一个简单的时间获取服务器程序 1.6 Roadmap to Client/Server Examples in theText 本书中客户/服务器示例的路线图 1.7 OSI Model OSI模型 1.8 BSD Networking History BSD网络历史 1.9 Test Networks and Hosts 测试用网络及主机 1.10 Unix Standards Unix标准 1.11 -Bit Architectures 位体系结构 1.12 Summary 小结 Chapter 2 The Transport Layer: TOP,UDP, and SCTP 传输层:TCP、UDP和SCTP 2.1 Introduction 概述 2.2 The Big Picture 全景图 2.3 User Datagram Protocol (UDP) 用户数据报协议 2.4 Transmission Control Protocol (TCP) 传输控制协议 2.5 Stream Control Transmission Protocol(SCTP) 流控制传输协议 2.6 TCP Connection Establishment andTermination TCP连接的建立和终止 2.7 TIME_WAIT State TIME_WAIT状态 2.8 SCTP Association Establishment andTermination SCTP关联的建立和终止 2.9 Port Numbers 端口号 2.10 TCP Port Numbers and ConcurrentServers TCP端口号与并发服务器 2.11 Buffer Sizes and Limitations 缓冲区大小及限制 2.12 Standard Internet Services 标准因特网服务 2.13 Protocol Usage by Common InternetApplications 常见因特网应用所用的协议 2.14 Summary 小结Part 2 Elementary Sockets 基本套接字 Chanter 3 Sockets Introduction 套接字简介 3.1 Introduction 概述 3.2 Socket Address Structures 套接字地址结构 3.3 Value-Result Arguments 值-结果参数 3.4 Byte Ordering Functions 字节排序函数 3.5 Byte Manipulation Functions 字节操纵函数 3.6 inet_aton, inet_addr, and inet_ntoa Functions inet_aton、inet_addr和inet_ntoa函数 3.7 inet_pton and inet_ntop Functions inet_pton和inet_ntop函数 3.8 sock_ntop and Related Functions 6 sock_ntop和相关函数 3.9 readn, writen, and readline Functions readn、writen和readline函数 3.10 Summary 小结 Chapter 4 Elementary TCP Sockets 基本TCP套接字 4.1 Introduction 概述 4.2 socket Function socket函数 4.3 connect Function connect函数 4.4 bind Function bind函数 4.5 listen Function listen函数 4.6 accept Function accept函数 4.7 fork and exec Functions fork和exec函数 4.8 Concurrent Servers 并发服务器 4.9 close Function close函数 4.10 getsockname and getpeernameFunctions getsockname和getpeername函数 4.11 Summary 小结 Chapter 5 TCP Client/Server Example TCP客户/服务器示例 5.1 Introduction 概述 5.2 TCP Echo Server: main Function TCP回送服务器程序:main函数 5.3 TCP Echo Server: str_echo Function TCP回送服务器程序:str_echo函数 5.4 TCP Echo Client: main Function TCP回送客户程序:main函数 5.5 TCP Echo Client: str_cli Function TCP回送客户程序:str_cli函数 5.6 Normal Startup 正常启动 5.7 Normal Termination 正常终止 5.8 POSIX Signal Handling POSIX信号处理 5.9 Handling SIGCHLD Signals 处理SIGCHLD信号 5.10 wait and waitpid Functions wait和waitpid函数 5.11 Connection Abort before acceptReturns accept返回前连接异常中止 5.12 Termination of Server Process 服务器进程的终止 5.13 SIGPIPE Signal SIGPIPE信号 5.14 Crashing of Server Host 服务器主机崩溃 5.15 Crashing and Rebooting of Server Host 服务器主机崩溃及重启 5.16 Shutdown of Server Host 服务器主机关机 5.17 Summary of TCP Example TCP示例小结 5.18 Data Format 数据格式 5.19 Summary 小结 Chapter 6 I/O多路复用:select和poll函数 Chapter 7 套接字选项 Chapter 8 基本UDP套接字 Chapter 9 基本SCTP套接字 Chapter 10 SCTP客户/服务器示例 Chapter 11 名字与地址转换Part 3 高级套接字 Chapter 12 IPv4与IPv6的互操作性 Chapter 13 守护进程和inetd超级服务器程序 Chapter 14 高级I/O函数 Chapter 15 Unix域协议 Chapter 16 非阻塞I/O Chapter 17 ioctl操作 Chapter 18 路由套接字 Chapter 19 密钥管理套接字 Chapter 20 广播 Chapter 21 多播 Chapter 22 高级UDP套接字 Chapter 23 高级SCTP套接字 Chapter 24 带外数据 Chapter 25 信号驱动I/O Chapter 26 线程 Chapter 27 IP选项 Chapter 28 原始套接字 Chapter 29 数据链路访问 Chapter 30 多种客户/服务器设计方式 Chapter 31 STREAMSAppendix A IPv4、IPv6、ICMPv4和ICMPv6Appendix B 虚拟网络Appendix C 调试技术Appendix D 其他源代码Appendix E 精选习题答案参考文献索引 作者介绍 1.1 Introduction 概述 When writing programs that communicate across a computer network, one must first invent a protocol, an agreement on how those programs will communicate. Before delv- ing into the design details of a protocol, high-level decisions must be made about which program is expected to initiate communication and when responses are expected. F r example, a Web server is typically thought of as a long-running program (or daemon) that sends network messages only in response to requests coming in from the network. The other side of the protocol is a Web client, such as a browser, which always initiates communication with the server. This organization into client and server is used by most network-aware applications. Deciding that the client always initiates requests tends to simplify the protocol as well as the programs themselves. Of course, some of the more complex network applications also require asynchronous callback communication, where the server initiates a message to the client. But it is far more common for applications to stick to the basic client/server model shown in Figure 1.1. Clients normally communicate with one server at a time, although using a Web browser as an example, we might communicate with many different Web servers over, say, a 10-minute time period. But from the server's perspective, at any given point in time, it is not unusual for a server to be communicating with multiple clients. We show this in Figure 1.2. Later in this text, we will cover several different ways for a server to handle multiple clients at the same time. …… 序言
以下为对购买帮助不大的评价