Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1246979
  • 博文数量: 177
  • 博客积分: 1528
  • 博客等级: 上尉
  • 技术积分: 1891
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-15 18:03
文章分类

全部博文(177)

文章存档

2020年(1)

2018年(19)

2017年(4)

2016年(21)

2015年(40)

2014年(13)

2013年(26)

2012年(16)

2011年(37)

我的朋友

发布时间:2013-05-07 10:16:32

发送端 client.c//server1 发送数据#include "stock.h"#define MYPORT 8866 /*定义端口为8866*/    int main(int argc,char *argv[]){    int sockfd,n,m;    struct sockaddr_in server_addr;    struct hostent *host;//保证输入2个参数.........【阅读全文】

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

发布时间:2013-05-07 10:15:43

服务器#include <sys/types.h> #include <sys/socket.h> #include <string.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #define MAXLINE 1024 #define SERV_PORT 8000struct MSG_PACK{    char cmd;    char.........【阅读全文】

阅读(7265) | 评论(0) | 转发(1)

发布时间:2013-05-07 10:14:57

#include <stdarg.h>#include <stdio.h>#include <netdb.h>#include <sys/socket.h>#include <netinet/in.h>#include <errno.h>#include <sys/select.h>#include <math.h>void process_client(int s) {     char buff[128];     int rc,maxfd;  &nbs.........【阅读全文】

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

发布时间:2013-05-07 10:13:29

转自:http://qiang.ws/index.php/archives/195要使用UDP协议进行通讯,需要以下几个步骤:服务器端(接收着端):创建套接字。将创建的套接字绑定到本地的地址和端口上。等待接收数据。关闭套接字。客户端(发送端):创建套接.........【阅读全文】

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

发布时间:2013-05-07 10:11:59

貌似很神秘的一个东西,我们就来"强行"揭开她的面纱......说实话,我们不是第一次见她了!你说是不?(什么?不是?今天我们DOTA校队去和人家比赛,正因为没看上郁闷着呢,你还来给我添点油是吧...)话说曾经我们在看serio.c的时候,遇到了这么一个模糊的面孔(说模糊是因为我们没对她过多深入):    serio_task = kth.........【阅读全文】

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

登录 注册