Effective TCP/IP Programming: 44 Tips to Improve Your Network Programs (Paperback)
暫譯: 有效的 TCP/IP 程式設計:提升網路程式的 44 個技巧 (平裝本)

Jon C. Snader

買這商品的人也買了...

相關主題

商品描述

 

Description

 

An excellent next-step for students who have read Stevens' TCP/IP Illustrated series, this book is designed to boost programmers to a higher level of competence by focusing on the protocol suite's more subtle features and techniques. In forty-four concise, self-contained lessons, this book offers experience-based tips, practices, and rules of thumb for learning high-performance TCP/IP programming techniques. Moreover, it shows you how to avoid many of TCP/IP's most common trouble spots. Numerous examples demonstrate essential ideas and concepts. Skeleton code and a library of common functions allow you to write applications without having to worry about routine chores.

Back to Top


Appropriate Courses

Networking--Advanced Topics.

Back to Top

 

Table Of Contents

 

Preface.
1. Introduction.

 

A Few Conventions.
Road Map to the Rest of the Book.
Client-Server Architecture.
Basic Sockets API Review.
Summary.


2. Basics.

 

Tip 1: Understand the Difference between Connected and Connectionless Protocols.
Tip 2: Understand Subnets and CIDR.
Tip 3: Understand Private Addresses and NAT.
Tip 4: Develop and Use Application “Skeletons.”
Tip 5: Prefer the Sockets Interface to XTI/TLI.
Tip 6: Remember That TCP Is a Stream Protocol.
Tip 7: Don't Underestimate the Performance of TCP.
Tip 8: Avoid Reinventing TCP.
Tip 9: Realize That TCP Is a Reliable Protocol, Not an Infallible Protocol.
Tip 10: Remember That TCP/IP Is Not Polled.
Tip 11: Be Prepared for Rude Behavior from a Peer.
Tip 12: Don't Assume That a Successful LAN Strategy Will Scale to a WAN.
Tip 13: Learn How the Protocols Work.
Tip 14: Don't Take the OSI Seven-Layer Reference Model Too Seriously.


3. Building Effective and Robust Network Programs.

 

 

Tip 15: Understand the TCP Write Operation.
Tip 16: Understand the TCP Orderly Release Operation.
Tip 17: Consider Letting inetd Launch Your Application.
Tip 18: Consider Letting tcpmux “Assign” Your Server's Well-Known Port.
Tip 19: Consider Using Two TCP Connections.
Tip 20: Consider Making Your Applications Event Driven (1).
Tip 21: Consider Making Your Applications Event Driven (2).
Tip 22: Don't Use TIME-WAIT Assassination to Close a Connection.
Tip 23: Servers Should Set the SO_REUSEADDR Option.
Tip 24: When Possible, Use One Large Write Instead of Multiple Small Writes.
Tip 25: Understand How to Time Out a Connect Call.
Tip 26: Avoid Data Copying.
Tip 27: Zero the sockaddr_in Structure Before Use.
Tip 28: Don't Forget about Byte Sex.
Tip 29: Don't Hardcode IP Addresses or Port Numbers in Your Application.
Tip 30: Understand Connected UDP Sockets.
Tip 31: Remember That All the World's Not C.
Tip 32: Understand the Effects of Buffer Sizes.


4. Tools and Resources.

 

 

Tip 33: Become Familiar with the ping Utility.
Tip 34: Learn to Use tcpdump or a Similar Tool.
Tip 35: Learn to Use traceroute.
Tip 36: Learn to Use ttcp.
Tip 37: Learn to Use lsof.
Tip 38: Learn to Use netstat.
Tip 39: Learn to Use Your System's Call Trace Facility.
Tip 40: Build and Use a Tool to Capture ICMP Messages.
Tip 41: Read Stevens.
Tip 42: Read Code.
Tip 43: Visit the RFC Editor's Page.
Tip 44: Frequent the News Groups.


Appendix A: Miscellaneous UNIX Code.

 

 

etcp.h Header.
The daemon Function.
The signal Function.


Appendix B: Miscellaneous Windows Code.

 

 

The skel.h Header.
Windows Compatibility Routines.


Bibliography.
Index. 0201615894T04062001


Back to Top

 

 

商品描述(中文翻譯)

描述

這本書是對已閱讀 Stevens 的《TCP/IP Illustrated》系列的學生的絕佳進階選擇,旨在通過專注於協議套件的更微妙特徵和技術,提升程式設計師的能力。書中包含四十四個簡潔且獨立的課程,提供基於經驗的提示、實踐和經驗法則,以學習高效能的 TCP/IP 程式設計技術。此外,它還展示了如何避免 TCP/IP 中最常見的問題點。眾多範例展示了基本概念和想法。骨架程式碼和常用函數庫使您能夠編寫應用程式,而無需擔心日常瑣事。

適合的課程

網路 - 進階主題。

目錄

前言。
1. 介紹。

一些約定。
本書的路線圖。
客戶端-伺服器架構。
基本的 Sockets API 回顧。
總結。

2. 基礎知識。

提示 1:了解連接協議和無連接協議之間的區別。
提示 2:了解子網和 CIDR。
提示 3:了解私有地址和 NAT。
提示 4:開發和使用應用程式“骨架”。
提示 5:優先使用 Sockets 介面而非 XTI/TLI。
提示 6:記住 TCP 是一種流協議。
提示 7:不要低估 TCP 的性能。
提示 8:避免重新發明 TCP。
提示 9:認識到 TCP 是一種可靠的協議,而不是萬無一失的協議。
提示 10:記住 TCP/IP 不是輪詢的。
提示 11:準備好應對來自對等方的粗魯行為。
提示 12:不要假設成功的 LAN 策略會擴展到 WAN。
提示 13:了解協議的運作方式。
提示 14:不要過於認真對待 OSI 七層參考模型。

3. 建立有效且穩健的網路程式。

提示 15:了解 TCP 寫入操作。
提示 16:了解 TCP 有序釋放操作。
提示 17:考慮讓 inetd 啟動您的應用程式。
提示 18:考慮讓 tcpmux“分配”您的伺服器的知名端口。
提示 19:考慮使用兩個 TCP 連接。
提示 20:考慮讓您的應用程式事件驅動 (1)。
提示 21:考慮讓您的應用程式事件驅動 (2)。
提示 22:不要使用 TIME-WAIT 謀殺來關閉連接。
提示 23:伺服器應設置 SO_REUSEADDR 選項。
提示 24:在可能的情況下,使用一次大型寫入而不是多次小型寫入。
提示 25:了解如何對連接調用設置超時。
提示 26:避免數據複製。
提示 27:在使用前將 sockaddr_in 結構歸零。
提示 28:不要忘記字節序。
提示 29:不要在您的應用程式中硬編碼 IP 地址或端口號。
提示 30:了解連接的 UDP Sockets。
提示 31:記住全世界並非只有 C 語言。
提示 32:了解緩衝區大小的影響。

4. 工具和資源。

提示 33:熟悉 ping 工具。
提示 34:學會使用 tcpdump 或類似工具。
提示 35:學會使用 traceroute。
提示 36:學會使用 ttcp。
提示 37:學會使用 lsof。
提示 38:學會使用 netstat。
提示 39:學會使用系統的調用追蹤功能。
提示 40:建立並使用捕獲 ICMP 訊息的工具。
提示 41:閱讀 Stevens 的著作。
提示 42:閱讀程式碼。
提示 43:訪問 RFC 編輯器的頁面。
提示 44:經常參加新聞組。

附錄 A:雜項 UNIX 程式碼。

etcp.h 標頭。
daemon 函數。
signal 函數。

附錄 B:雜項 Windows 程式碼。

skel.h 標頭。
Windows 相容性例程。

參考書目。
索引。 0201615894T04062001