摘要: A synchronous I/O operation causes the requesting process to be blocked until that I/O operation completes; An asynchronous I/O operation does not cause the requesting process to be blocked; 使用http:... 阅读全文
posted @ 2014-02-20 22:17 ITtecman 阅读(1044) 评论(0) 推荐(0) 编辑
摘要: 当从一个描述符读,然后又写到另一个描述符时,可以在下列形式的循环中使用阻塞I/O:while ((n = read(STDIN_FILENO, buf, BUFSIZ)) > 0) if (write(STDOUT_FILENO, buf, n) != n) err_sys("w... 阅读全文
posted @ 2014-02-20 14:26 ITtecman 阅读(1109) 评论(0) 推荐(0) 编辑