从头再来

Linux高性能服务器编程阅读随笔(一)





Page 76 . 5.4 监听socket 




此处作者说法不完整。  


通过Google "man listen "  http://linux.die.net/man/2/listen


listen() marks the socket referred to by sockfd as a passive socket, that is, as a socket that will be used to accept incoming connection requests using accept(2).

The sockfd argument is a file descriptor that refers to a socket of type SOCK_STREAM or SOCK_SEQPACKET.

The backlog argument defines the maximum length to which the queue of pending connections for sockfd may grow. If a connection request arrives when the queue is full, the client may receive an error with an indication of ECONNREFUSED or, if the underlying protocol supports retransmission, the request may be ignored so that a later reattempt at connection succeeds.





可见与实现有关。


书的内容还是很全的,但作者的观点略感觉不对。  服务器中用信号来通知的,或者说来做异步的,就我了解是几乎没有。  作者去花了很多篇幅去介绍。

让人感觉完全是为了凑字数啊。  书名里面的“高性能”要打个折扣了

posted on 2014-10-21 19:14 易宝@byhh 阅读(359) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理