Chinaunix首页 | 论坛 | 博客
  • 博客访问: 37747
  • 博文数量: 41
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 357
  • 用 户 组: 普通用户
  • 注册时间: 2014-04-20 16:26
文章分类

全部博文(41)

文章存档

2014年(41)

我的朋友

发布时间:2014-04-23 22:01:29

获取时间:#include <stdio.h>#include <time.h>int main(){    time_t t;    struct tm *lt;    t = time(NULL);//获取秒数计的时间//time(&t)    lt = localtime(&t);//获取本地时间    printf("local time:%d/%d/%d.........【阅读全文】

阅读(204) | 评论(0) | 转发(0)

发布时间:2014-04-23 21:21:44

client:#include <stdio.h>#include <sys/stat.h>#include <stdlib.h>#include <unistd.h>#include <errno.h>#include <string.h>#include <sys/types.h>#include <sys/socket.h>#include<netinet/in.h>int main(){    int opt = 1;    socklen_t len = sizeof(len);&nbs.........【阅读全文】

阅读(157) | 评论(0) | 转发(0)

发布时间:2014-04-23 21:14:39

一个select函数的例子#include <stdio.h>#include <time.h>#include <sys/types.h>#include <unistd.h>#include <fcntl.h>int main(){    struct timeval tv;    char buf[100] = "pig";    fd_set readfds;    tv.tv_sec = 4;  &nbs.........【阅读全文】

阅读(205) | 评论(0) | 转发(0)

发布时间:2014-04-22 08:38:16

......【阅读全文】

阅读(196) | 评论(0) | 转发(0)

发布时间:2014-04-20 21:08:07

......【阅读全文】

阅读(88) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册