非常不错,受益匪浅
![](https://img9.doubanio.com/icon/u48478710-5.jpg)
但是第17章,有个很明显的,不可忽视的错误。查阅了一下英文原版,确定不是译者翻译的问题。如下:This type of server cannot use only one port because each connection needs a port
and many connections may be open at the same time. Many ports are needed, but a server
can use only one well-known port. The solution is to have one well-known port and many
ephemeral ports. The server accepts connection requests at the well-known port. A client
can make its initial approach to this port to make the connection. After the connection is
made, the server assigns a temporary port to this connection to free the well-known port.
Data transfer can now take place between these two temporary ports, one at the client site
and the other at the server site. The well-known port is now free for another client to make
the connection. To serve several clients at the same time, a server creates child processes,
which are copies of the original process (parent process).”。文中提到会创建临时端口号,其实不是,并没有创建临时端口号用于他们通信,而是通过套接字对来区分每一个已连接套接字和监听套接字。这个在史蒂文森的《unix网络编程卷1》中有讲到
and many connections may be open at the same time. Many ports are needed, but a server
can use only one well-known port. The solution is to have one well-known port and many
ephemeral ports. The server accepts connection requests at the well-known port. A client
can make its initial approach to this port to make the connection. After the connection is
made, the server assigns a temporary port to this connection to free the well-known port.
Data transfer can now take place between these two temporary ports, one at the client site
and the other at the server site. The well-known port is now free for another client to make
the connection. To serve several clients at the same time, a server creates child processes,
which are copies of the original process (parent process).”。文中提到会创建临时端口号,其实不是,并没有创建临时端口号用于他们通信,而是通过套接字对来区分每一个已连接套接字和监听套接字。这个在史蒂文森的《unix网络编程卷1》中有讲到
有关键情节透露