文件名称:server1
-
所属分类:
- 标签属性:
- 上传时间:2017-01-18
-
文件大小:2.34kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
使用UDP 创建一个服务器:client 和 server各一个进程
1)UDP服务器,可以接受各路发来的信息, 收到消息之后, 添加确认字符(ack)发回给对应用户
如 client1发送helloworld给服务器
服务器收到后,返回 getMsgACK:helloworld
2)client1会记录自己发出的所有信息,并确认服务器是否收到了 ,
也就是client1同时接收服务器发来的消息,对消息进行分析getMsgACK: (strtok)
确认服务器收到后, 把信息从发出链表中删除;
3) 如果消息链表有内容,每隔1秒提示是否重发该消息 alarm()-
299/5000
Use UDP to create a server: client and server each process
1) UDP server, you can accept the information sent each way, after receiving the message, add confirmation characters (ack) back to the corresponding user
If client1 sends helloworld to the server
When the server receives it, it returns getMsgACK: helloworld
2) Client1 will record all the information they sent, and confirm whether the server received,
Which is receiving client server1 at the same time the news sent to the analysis of information GetMsgACK: (strtok)
Confirm the server receives, the information the list issued to delete
3) If the message list has a content, every 1 second prompts whether to re-send the message alarm ()
1)UDP服务器,可以接受各路发来的信息, 收到消息之后, 添加确认字符(ack)发回给对应用户
如 client1发送helloworld给服务器
服务器收到后,返回 getMsgACK:helloworld
2)client1会记录自己发出的所有信息,并确认服务器是否收到了 ,
也就是client1同时接收服务器发来的消息,对消息进行分析getMsgACK: (strtok)
确认服务器收到后, 把信息从发出链表中删除;
3) 如果消息链表有内容,每隔1秒提示是否重发该消息 alarm()-
299/5000
Use UDP to create a server: client and server each process
1) UDP server, you can accept the information sent each way, after receiving the message, add confirmation characters (ack) back to the corresponding user
If client1 sends helloworld to the server
When the server receives it, it returns getMsgACK: helloworld
2) Client1 will record all the information they sent, and confirm whether the server received,
Which is receiving client server1 at the same time the news sent to the analysis of information GetMsgACK: (strtok)
Confirm the server receives, the information the list issued to delete
3) If the message list has a content, every 1 second prompts whether to re-send the message alarm ()
(系统自动生成,下载前可以参看下载内容)
下载文件列表
server1.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.