根据网上代码http://blog.csdn.net/zchengdong/article/details/6934466 修改,具体打开的socket情况使用lsof -u username 查看,修改后的代码情况如下,可分别修改读取的s[0],s[1]查看读写情况。#include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <errno.h> #include <errno.h> #include Read More
posted @ 2012-03-14 14:34 lingjip Views(420) Comments(0) Diggs(0) Edit