Chinaunix首页 | 论坛 | 博客
  • 博客访问: 590403
  • 博文数量: 150
  • 博客积分: 1132
  • 博客等级: 少尉
  • 技术积分: 2067
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-11 16:46
文章分类

全部博文(150)

文章存档

2015年(15)

2014年(75)

2013年(4)

2012年(56)

分类: LINUX

2014-10-29 18:38:45

1. socket 的阻塞与非阻塞的含义:
When  the  message  does not fit into the send buffer of the socket, send() normally blocks, unless the socket has been placed in nonblocking I/O mode. In nonblocking mode it would fail with the error EAGAIN  or EWOULDBLOCK in this case. The select(2) call may be used to determine when it is possible to send more data.
socket 的发送 buffer 和接收 buffer 的大小可以分别通过 getsockopt 和 setsockopt 获取和设置。
阅读(723) | 评论(0) | 转发(0) |
0

上一篇:时间编程

下一篇:制作补丁与打补丁

给主人留下些什么吧!~~