版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a_studycx/article/details/54962480
______________________________________________
| MSG_DONTROUTE | 不查找路由表 |
| MSG_OOB | 接受或发送带外数据 |
| MSG_PEEK | 查看数据,并不从系统缓冲区移走数据 |
| MSG_WAITALL | 等待任何数据 |
|————————————————————–|
如果flags为0,则和read,write一样的操作。
2、在unix中,所有的设备都可以看成是一个文件,所以我们可以用read来读取socket数据。
参考
【1】 http://apps.hi.baidu.com/share/detail/137478
【2】 设置非阻塞
http://www.ajaxstu.com/Cbiancheng/107652.html
【3】 http://blog.163.com/solylee@126/blog/static/17182315720111161368585/
【4】http://blog.163.com/clevertanglei900@126/blog/static/111352259201122001933162/
【5】 http://topic.csdn.net/u/20090703/20/36925146-0f73-47fe-8a71-45ec245166ba.html