文件名称:server1
- 所属分类:
- Internet/网络编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2017-01-18
- 文件大小:
- 2kb
- 下载次数:
- 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