找回密码
 注册
搜索
查看: 578|回复: 4

[讨论] linux socket programming by example-------FREE TO DOWN

[复制链接]
发表于 2007-2-9 09:13:41 | 显示全部楼层 |阅读模式
  undefined
汗~~~~找到不能上传的原因了: 不能使用FIREFOX济览器, 要使用IE, 已上传到4楼.
FREE DOWN.....
[此贴子已经被作者于2007-2-9 16:48:48编辑过]
 楼主| 发表于 2007-2-9 09:14:49 | 显示全部楼层
Introduction
About the Author
Part 1—Basic Socket Concepts
Chapter 1—Introducing Sockets
A Brief Historical Introduction
Understanding Sockets
Defining a Socket
Using Sockets
Referencing Sockets
Comparing Sockets to Pipes
Creating Sockets
Using socketpair(2) in an Example
Running the Demonstration Program
Performing I/O on Sockets
Closing Sockets
The shutdown(2) Function
Shutting Down Writing to a Socket
Dealing with Duplicated Sockets
Shutting Down Reading from a Socket
Knowing When Not to Use shutdown(2)
Writing a Client/Server Example
Chapter 2—Domains and Address Families
Nameless Sockets
Anonymous Calls
Generating Addresses
Understanding Domains
Forming Socket Addresses
Examining the Generic Socket Address
Forming Local Addresses
Forming Traditional Local Addresses
Forming Abstract Local Addresses
Forming Internet (IPv4) Socket Addresses
Understanding Network Byte Order
Performing Endian Conversions
Initializing a Wild Internet Address
Initializing a Specific Internet Address
Specifying an X.25 Address
Specifying Other Address Families
The AF_UNSPEC Address Family
What’s Next
Chapter 3—Address Conversion Functions
Internet IP Numbers
Internet Address Classes
Understanding Netmask Values
Allocating IP Addresses
Private IP Numbers
Reserved IP Numbers
Manipulating IP Numbers
Using the inet_addr(3) Function
The inet_aton(3) Function
Using the inet_ntoa(3) Function
Using inet_network(3)
Using the inet_lnaof(3) Function
Using the inet_netof(3) Function
Using the inet_makeaddr(3) Function
What’s Next
Chapter 4—Socket Types and Protocols
Specifying the Domain of a Socket
Choosing PF_INET or AF_INET
Using the PF_LOCAL and AF_LOCAL Macros
Using the socket(2) Function
Choosing a Socket Type
Understanding the SOCK_STREAM Socket Type
Understanding the SOCK_DGRAM Socket Type
Understanding the SOCK_SEQPACKET Socket Type
Choosing a Protocol
Using PF_LOCAL and SOCK_STREAM
Using PF_LOCAL and SOCK_DGRAM
Using PF_INET and SOCK_STREAM
Using PF_INET and SOCK_DGRAM
Socket Domain and Type Summary
Other Linux-Supported Protocols
Researching Other Protocols
Chapter 5—Binding Addresses to a Socket
The Purpose of the bind(2) Function
Using the bind(2) Function
Obtaining the Socket Address
Writing a sock_addr() Function
Obtaining a Peer Socket Address
Interfaces and Addressing
Specifying an Interface Address Example
Binding a Specific Interface Address
Binding for Any Interface
Chapter 6—Connectionless-Oriented Protocols
The Methods of Communication
Understanding the Advantages
Understanding the Disadvantages of Connectionless Communications
Performing Input/Output of Datagrams
Introducing the sendto(2) Function
Introducing the recvfrom(2) Function
Writing a UDP Datagram Server
Writing a UDP Datagram Client
Testing the Datagram Client and Server
Testing with No Server
Testing with Other IP Numbers
Leaving Out bind(2) in Client Programs
Replying to a Wild Address
Chapter 7—Connection-Oriented Protocols for Clients
Reviewing the Methods of Communication
TCP/IP Handles Lost Packets
TCP/IP Handles Duplicated Packets
TCP/IP Handles Sequencing
TCP/IP Handles Flow Control
Understanding the Advantages of TCP/IP
Internet Services
Examining the /etc/services File
Using Function getservent(3)
Using the setservent(3) Function
Using the endservent(3) Function
Looking Up a Service by Name and Protocol
Looking Up a Service by Port and Protocol
Consulting the /etc/protocols File
Using the setprotoent(3) Function
Using the endprotoent(3) Function
Looking Up a Protocol by Name
Looking Up a Protocol by Number
Writing a TCP/IP Client Program
Introducing the connect(2) Function
Preparing to Write the Client Program
The daytime Client Program
Using connect(2) on SOCK_DGRAM Sockets
Chapter 8—Connection-Oriented Protocols for Servers
Understanding the Role of the Server
The listen(2) Function
Understanding the Connect Queue
Specifying a Value for backlog
The accept(2) Function Call
Understanding the Role of accept(2)
Writing a TCP/IP Server
Running a Wild Server
Modifying the Client Program
Chapter 9—Hostname and Network Name Lookups
Understanding the Need for Names
Using the uname(2) Function
Obtaining Hostnames and Domain Names
Using Function gethostname(2)
Using the getdomainname(2) Function
Testing gethostname(2) and getdomainname(2)
Resolving Remote Addresses
Error Reporting
Reporting an h_errno Error
Using the gethostbyname(3) Function
Applying the gethostbyname(3) Function
The gethostbyaddr(3) Function
Using the sethostent(3) Function
Using the endhostent(3) Function
Part 2—Advanced Socket Programming
Chapter 10—Using Standard I/O on Sockets
Understanding the Need for Standard I/O
Associating a Socket with a Stream
Using fdopen(3) to Associate a Socket with a Stream
Closing a Socket Stream
Using Separate Read and Write Streams
Duplicating a Socket
Closing the Dual Streams
Winding Up Communications
Shutting Down the Write Side Only
Shutting Down the Read Side Only
Shutting Down Both Read and Write Sides
Handling Interrupts
Handling EINTR for Other Functions
Defining Buffer Operation
Applying FILE Streams to Sockets
Presenting the mkaddr() Function
The RPN Calculator Engine Code
Trying Out the RPN Server
Chapter 11—Concurrent Client Servers
Understanding the Multiple-Client Problem
Overview of Server Functions
Using fork(2) to Service Multiple Clients
Understanding the Overall Server Process
Understanding the Child Server Process Flow
Understanding Process Termination Processing
Designing Servers That Use select(2)
Introducing the select(2) Function
Manipulating File Descriptor Sets
Applying select(2) to a Server
Testing the select(2)-Based Server
Limitations of the Example
Chapter 12—Socket Options
Getting Socket Options
Applying getsockopt(2)
Setting Socket Options
Applying the setsockopt(2) Function
Retrieving the Socket Type (SO_TYPE)
Setting the SO_REUSEADDR Option
Setting the SO_LINGER Option
Setting the SO_KEEPALIVE Option
Setting the SO_BROADCAST Option
Setting the SO_OOBINLINE Option
Options SO_PASSCRED and SO_PEERCRED
Chapter 13—Broadcasting with UDP
Understanding Broadcast Addresses
Broadcasting on 255.255.255.255
Enhancing the mkaddr.c Subroutine
Broadcasting from a Server
Receiving Broadcasts
Demonstrating the Broadcasts
Broadcasting to a Network
Starting Broadcasts
Receiving Broadcasts
Receiving Broadcasts from a Remote Host
Troubleshooting Hints
Chapter 14—Out-of-Band Data
Defining Out-of-Band
Understanding the Need for Out-of-Band Data
Sockets and Out-of-Band Data
Variations in Implementation
Using Out-of-Band Data
Writing Out-of-Band Data
Reading Out-of-Band Data
Understanding the Signal SIGURG
Supporting Subprograms
Receiving with the SIGURG Signal
Sending Out-of-Band Data
Testing the oobrecv and oobsend Programs
Understanding the Urgent Pointer
Understanding TCP Urgent Mode
Urgent Mode When tcp_stdurg=1
Receiving Out-of-Band Data Inline
Determining the Urgent Pointer
Using Out-of-Band Data Inline
Limitations of the Urgent Mode Pointer
Processing Out-of-Band Data with select(2)
Chapter 15—Using the inetd Daemon
Steps Common to Most Servers
Introducing inetd
The /etc/inetd.conf Configuration File
The Design Parameters of inetd Servers
Implementing a Simple stream tcp Server
Configuring /etc/inetd.conf to Invoke a New Server
Disabling the New Service
Datagram Servers with inetd
Understanding wait and nowait
Chapter 16—Network Security Programming
Defining Security
The Challenges of Security
Identifying Friend or Foe
Securing by Hostname or Domain Name
Identifying by IP Number
Securing inetd Servers
Centralized Network Policy
Understanding the TCP Wrapper Concept
Determining Access
Installing Wrapper and Server Programs
Examining Server and Wrapper Logging Code
Examining the Datagram Server Code
Examining the Simple TCP Wrapper Program
Introducing the Client Program
Installing and Testing the Wrapper
Monitoring the Log Files
Starting Your inetd Daemon
Testing the Wrapper Program
Testing the Server Timeout
Uninstalling the Demonstration Programs
Datagram Vulnerability
Chapter 17—Passing Credentials and File Descriptors
Problem Statement
Introducing Ancillary Data
Introducing I/O Vectors
The I/O Vector (struct iovec)
The readv(2) and writev(2) Functions
The sendmsg(2) and recvmsg(2) Functions
The sendmsg(2) Function
The recvmsg(2) Function
Understanding struct msghdr
Ancillary Data Structures and Macros
Introducing the struct cmsghdr Structure
Introducing the cmsg(3) Macros
Iterating Through Ancillary Data
Creating Ancillary Data
Presenting an Ancillary Data Example
The Common Header File common.h
The misc.c Module
The recvcred.c Module
The Simple Web Server web80
The reqport() Function
The recv_fd() Function
The sockserv Server Program
The send_fd() Function
Testing the Socket Server
Testing sockserv
Chapter 18—A Practical Network Project
Problem Statement
Solving the Quote Service Problem
Obtaining Stock Market Quotes
Examining the Quote Server Program
Fetching Quotations via get_tickinfo()
Broadcasting Quotes via broadcast()
Examining the Client Program
Compiling and Running the Demonstration
Starting the qserve Quotation Server
Starting the mktwatch Client
If the finance.yahoo.com Service Changes
Appendix A
Appendix B
Appendix C
Glossary
Index
Copyright © Macmillan Computer Publishing, Inc.
点评回复

使用道具 举报

发表于 2007-2-9 10:15:01 | 显示全部楼层
看起来不错,但好像上传没成功。, 看起来不错,但好像上传没成功。
点评回复

使用道具 举报

 楼主| 发表于 2007-2-9 16:40:03 | 显示全部楼层
汗,连着上传了两次,都没有成功~~~,再试一把~~~
点评回复

使用道具 举报

 楼主| 发表于 2007-2-9 16:46:54 | 显示全部楼层

linux socket programming by example

linux socket programming by example
【文件名】:0729@52RD_linux socket programming by example(3).PDF
【格 式】:pdf
【大 小】:2886K
【简 介】:
【目 录】:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-10-6 22:19 , Processed in 0.062995 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表