- 博客(7)
- 收藏
- 关注
内存对齐初探
test.c #include <stdio.h>struct stu{ char sex; int length; char name[10];};int main(){ char name[10]; struct stu mystu; pri...
2015-04-28 11:09:44
93
标准输入复制到标准输出
#include <unistd.h>#include <stdio.h>#include <stdlib.h>#define BUFFSIZE 4096int main(void){ int n; char buf[BUFFSIZE]; while ((n = read(ST...
2015-04-23 22:39:54
156
myls.c 读目录
#include <dirent.h>#include <stdio.h>#include <stdlib.h>int main(int argc, char *argv[]){ DIR *dp; struct dirent *dirp; if (argc != 2) ...
2015-04-23 21:11:35
467
Socket epoll
#include <sys/socket.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <netinet/in.h>#include <string.h>#include <sys/epoll.h&
2015-03-25 16:25:07
83
Linux Socket select IO多路复用
#include <sys/socket.h>#include <stdio.h>#include <errno.h>#include <string.h>#include <stdlib.h>#include <netinet/in.h>#define BACKLOG 5#define M...
2015-03-24 22:54:16
107
Linux Socket 多进程服务器
server.c#include <sys/socket.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <string.h>#include <netinet/in.h>#include <signal....
2015-03-24 15:51:08
123
原创 Linux Socket 基础
编写服务端程序server.c #include <sys/socket.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <string.h>#include <netinet/in.h>#define ...
2015-03-24 11:10:43
129
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人