登录
首页 » 套接字网络编程 » udp编程 实现客户端与服务器通信

udp编程 实现客户端与服务器通信

于 2022-01-23 发布 文件大小:13.57 kB
0 120
下载积分: 2 下载次数: 1

代码说明:

  基于UDP通信模拟Go-Back N ARQ工作过程。UDP的客户端相当于ARQ的发送端,UDP的服务端相当于接收端。 需要模拟正常通信,发端数据出错、反向数据帧出错和反向数据帧过长导致确认超时三种类型的发端重传。   当发送窗口和接收窗口的大小都等于 1时,就是停止等待协议。 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • completed an example of the server and client simple oral communication process....
    该实例完成一个服务器端和客户端简单的会话通信过程.要求主机上安装TCP/IP协议,并设定IP.服务器端和客户端使用同一台主机的不同端口号,服务器端使用的端口号为2000,客户端使用的端口号为3000. 服务器端程序先运行,首先初始化Winsock,然后创建套接字,在2000端口上进行绑定,接着在2000端口进行侦听,并进入等待状态.客户端后运行,同样首先初始化winsock,然后创建套接字,接着尝试和服务器端的连接.连接一旦建立,就可以在服务器端和客户端之间进行通信.客户端提示输入一个数字,比如输入50,那么客户端会从"data0"到"data49"发送50个字符串,输入0退出.-completed an example of the server and client simple oral communication process. Asked on the mainframe installed TCP/IP protocol and set the IP. Servers and clients using the same host of different ports, the use of the server port to 2000, clients use the port number as 3000. server operating procedures first, the first initialization Winsock, and then create socket, in 2000 ports on bonding, then the 2000 port for the interception, and entered the wait state. client after running the same protocols of the first initialization, and then create socket, and then try to server connections. connecting once established, can the server and client communications between. the client suggested the import
    2022-01-26 06:53:43下载
    积分:1
  • /* This IPv4 example listens for incoming packets and automatically adds destina...
    /* This IPv4 example listens for incoming packets and automatically adds destinations for new sources. 这个例子主要是让大家了解下面3个函数的用法。 void OnNewSource(RTPSourceData *dat) void OnBYEPacket(RTPSourceData *dat) void OnRemoveSource(RTPSourceData *dat) 具体内容看我的测试文档吧。 例子的中文解释都由hanyuejun添加,有任何疑问请发hanyuejun2006@163.com */-/* This IPv4 example listens for incoming packets and automatically adds destinations for new sources. This example is designed to allow everyone to understand the following three functions usage. void OnNewSource (RTPSourceData* dat) void OnBYEPacket (RTPSourceData* dat) void OnRemoveSource (RTPSourceData* dat) the specific content of the test document I watch it. Explained by the example of the Chinese hanyuejun add, have any questions please send hanyuejun2006@163.com* /
    2022-03-26 07:31:21下载
    积分:1
  • socket 通信 控制台序 测试通过
    socket 网络通信 控制台程序 测试通过  #include #include #pragma comment(lib, "ws2_32.lib") void main() {     WORD wVersionRequested;     WSADATA wsaData;//WSAata用来存储系统传回的关于WinSocket的资料。     int err;          wVersionRequested = MAKEWORD( 1, 1 );          err = WSAStartup( wVersionRequested, &wsaData );     if ( err != 0 ) {         return;     }          if ( LOBYTE( wsaData.wVersion ) != 1 ||HIBYTE( wsaData.wVersion ) != 1 )      {         WSACleanup( );         return;     }     SOCKET sockClient=socket(AF_INET,SOCK_STREAM,0);// AF_INET ..tcp连接     //初始化连接与端口
    2023-07-26 07:35:05下载
    积分:1
  • XMAIL相关工具,通过WEB页面对XMAIL进行管理
    XMAIL相关工具,通过WEB页面对XMAIL进行管理-XMAIL correlation tool, carries on through the WEB page to XMAIL manages
    2022-02-22 05:50:14下载
    积分:1
  • WinCVS 源码,流行的CVS客户端源码
    WinCVS 源码,流行的CVS客户端源码程序-WinCVS source code, a popular CVS client.
    2023-04-19 16:25:04下载
    积分:1
  • c#socket 聊天
    本程序通过运用socket实现了聊天功能。本程序分为服务器端和客户端。服务器端创建一个socket对象,该对象的listen方法用来监听客户端的连接请求。连接好后 ,创建一个新的socket 用来与客户端进行交互。相应地,客户端建立一个socket,该对象的connect方法与服务器进行连接建立。建立好后开始交互。
    2022-12-25 07:55:02下载
    积分:1
  • socket.IO-objc.zip
    socket.IO-objc seems more complete and has a better documentation, but I"d also like to know which advantages does AZSocketIO provide to consider if these advantages are important enough for my project to choose one or the other.
    2022-06-28 22:17:55下载
    积分:1
  • 104规约IEC60870-5-104
    104规约子站源代码,IEC60870-5-104 远动设备及系统传输规约 处理 源码 源码只对应 1 RTU。代码有一些小错误,自行修改一下。
    2023-05-12 12:40:03下载
    积分:1
  • Introduced the complex network of community characteristics into the source code...
    介绍复杂网络社区划分社区特性的源代码,尤其是无标度网络-Introduced the complex network of community characteristics into the source code of the community, in particular, scale-free network
    2022-03-16 10:31:50下载
    积分:1
  • ccna 的教 中文教 ccna 的初级教
    ccna 网络的教程 中文教程 ccna 的初级教程-CCNA Network Chinese Tutorial Tutorial Tutorial CCNA junior
    2022-07-16 03:55:55下载
    积分:1
  • 696518资源总数
  • 105604会员总数
  • 18今日下载