
LINUX
文章平均质量分 73
hadise
这个作者很懒,什么都没留下…
展开
-
socket编程——TCP/UDP数据传输
<br />socket()——生成socket句柄<br />#include <sys/types.h>; <br />#include <sys/socket.h>; <br /><br />int socket(int domain, int type, int protocol); <br />domain : "AF_INET"<br />type : SOCK_STREAM(TCP), SOCK_DGRAM (UDP)<br />protocol:0<br />返回值:so原创 2010-07-07 14:37:00 · 841 阅读 · 0 评论 -
自己写的一个LINUX 下目录文件遍历程序
<br /><br />#include <stdio.h><br />#include <sys/stat.h><br />#include <unistd.h><br />#include <fcntl.h><br />#include <dirent.h><br />#include <stdlib.h><br />#include <sys/types.h><br />int lsdir(char *filepath , int ntap)<br />{<br /> struct stat buf原创 2010-07-30 23:00:00 · 1111 阅读 · 0 评论