03 2015 档案
摘要:(1)client1,基于SIGIO的写法: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 #include 8 #include 9 #include 10 11 #define BUFSIZE 12812 1...
阅读全文
摘要:转自:http://blog.csdn.net/historyasamirror/article/details/5778378向大牛学习,言归正传。同步(synchronous) IO和异步(asynchronous) IO,阻塞(blocking) IO和非阻塞(non-blocking)IO分...
阅读全文
摘要:先看poll(): 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 9 #define oops(x, n) { perror(x); exit(n); }10 11 int...
阅读全文
摘要:转自赖勇浩(http://laiyonghao.com)协程,又称微线程和纤程等,据说源于 Simula 和 Modula-2 语言(我没有深究,有错请指正),现代编程语言基本上都有支持,比如 Lua、ruby 和最新的 Google Go,当然也还有最近很让我惊艳的 falcon。协程是用户空间线...
阅读全文
摘要:1 #include 2 3 #include 4 #include 5 #include 6 7 #define CMDSIZE 4096 8 9 static void prompt(void)10 {11 printf("[mysh]$ ");12 fflush...
阅读全文

浙公网安备 33010602011771号