登录
首页 » Windows Socket编程 » 这里是我自己学习winsocket2 编程序时候所写的一个聊天室的程序,程序是一步一步完善过来的。 ChartSrv是服务器端 ChartCLie...

这里是我自己学习winsocket2 编程序时候所写的一个聊天室的程序,程序是一步一步完善过来的。 ChartSrv是服务器端 ChartCLie...

于 2022-07-04 发布 文件大小:109.52 kB
0 143
下载积分: 2 下载次数: 1

代码说明:

这里是我自己学习winsocket2 编程序时候所写的一个聊天室的程序,程序是一步一步完善过来的。 ChartSrv是服务器端 ChartCLient是客户端(可以开多个) 由于里面加入了获取hostname的东西所以速度有点慢,可以注释掉直接使用IP通信就快了。 代码展示了socket2的异步通信的实现,有兴趣的可以一起学习。-Here is my own time learning winsocket2 programmed written by a chat room procedures step by step procedure is to improve overnight. ChartSrv is a server-side ChartCLient the client (can be opened more than) as a result of which joined the hostname to obtain the speed of things so a bit slow, you can comment out the direct use of IP communications on faster. Code demonstrates the socket2 realize asynchronous communication, are interested in learning together.

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

发表评论

0 个回复

  • 计算校验和 校验和算法描述:为保证网络上传输的数据的可靠性,在许多协议中都设置了校验和项,例如:IPv4、ICMPv4、IGMPV4、ICMPv6、UDP...
    计算校验和 校验和算法描述:为保证网络上传输的数据的可靠性,在许多协议中都设置了校验和项,例如:IPv4、ICMPv4、IGMPV4、ICMPv6、UDP和TCP 等等。计算这些校验和的算法称为网际校验和算法,简单来说就是:把被校验的数据16位进行累加,然后取反码,若数据字节长度为奇数,则数据尾部补一个字节的0以凑成偶数。 由于从输入文件读入的数据不能直接满足计算校验和的条件,所以首先对从文件读入缓冲区的数据进行预处理,即读入缓冲区时忽略空格。由于累加是按16位进行的,所以每次从缓冲区中读出4个字符,并将字符转换成对应的16进制数字,如此依次累加,直至数据全部读完。 还有一种情况,即如果数据长度为奇数个字节,则需要判断,并补0累加。程序中利用的是缓冲区长度计数器i和当前读取到计数器j判断数据长度是否为奇数。即如果数据长度为偶数,则读完数据时当前读取到计数器j的值应与缓冲区长度i相等,而如果数据长度为奇数,则读完数据时,当前读取到计数器j>缓冲区长度i,此时需将缓冲区中剩余的两个字符读出,并补0,转换成相应16进制数以后参与累加。 当累加结束后,将累加和的16位以上数据位移下再进行一次累加,并对最后累加和取反即得所求校验和。 -calculated checksum checksum algorithm Description : To ensure the network transmission of data reliability, in many of the agreements are set up and calibration, for example : IPv4, ICMPv4, IGMPV4, ICMPv6. UDP and TCP so on. Calculating checksum algorithm called the Internet checksum algorithm, the simple answer is : as has been the calibration data for 16 cumulative, and then take the anti-code, if the data byte length of the odd, data will make up the tai
    2022-01-26 06:39:03下载
    积分:1
  • 完整的远文件管理系统,具有用户注册,用户文件管理,多线文件传送,窗口管理视屏等功能。是学习网络软件开发和网络软件应用不可多得的超级码代码,总的代码行数已达2...
    完整的远程文件管理系统,具有用户注册,用户文件管理,多线程文件传送,窗口管理视屏等功能。是学习网络软件开发和网络软件应用不可多得的超级码代码,总的代码行数已达2万行(20000行),但不得用于商业用途,否则可能会侵权,受到法律追究,谢谢。-Complete remote file management system with user registration, user document management, multi-threaded file transfer, screen window manager functions. Learning Network is a network software development and software application code code super rare, the total number of lines of code has reached 20,000 lines (20000 lines), but shall not be used for commercial purposes, or may be infringement, subject to legal action, thank you.
    2022-07-11 21:48:13下载
    积分:1
  • Http link to download the designated time, only the use of socket to download
    下载指定http链接的时候,仅仅使用socket去下载-Http link to download the designated time, only the use of socket to download
    2022-03-14 12:18:40下载
    积分:1
  • 网络聊天序设计
    网络聊天程序设计-Internet chat program design
    2023-05-04 12:40:02下载
    积分:1
  • domain High
    网域高科购物系统前台购买特征: 网域高科购物系统是网域高科设计开发的基于WEB的大型购物系统。它以构建电子商务网站为目标,由前台购物、后台管理、在线支付三大部分组成。 后台管理为admin/login.asp 网域高科购物系统测试管理员:帐号:admin888,密码:admin888 网域高科购物系统前台测试会员:帐号:123456 ,密码:123456 演示:http://www.wygk.cn-domain High-Tech Shopping System future purchase features : High-Tech Shopping Network Domain network system is designed to develop science and technology domain-based Web shopping system. It is to build e-commerce sites targeted by the prospects of shopping, management background, the online payment three major components. Background management admin/log domain High-Tech Shopping System test administrator : Account : admin888, Password : admin888 domain High-Tech Shopping System test prospects Member : Account number : 123456, password : 123456 Demonstration : http://www.wygk.cn
    2022-03-19 22:41:28下载
    积分:1
  • 完全是个人写的一个FTP服务器,功能不是很全,但应该有一定的参考价值。...
    完全是个人编写的一个FTP服务器,功能不是很全,但应该有一定的参考价值。-is prepared by a personal FTP server function is not all, but there should be some reference value.
    2022-02-02 10:43:56下载
    积分:1
  • 用VB开发的自动更新序,显示下载进度,多线下载
    用VB开发的自动更新程序,显示下载进度,多线程下载-VB development of the automatic update, showing the progress of the download, multi-threaded Download
    2023-07-28 20:35:03下载
    积分:1
  • Release Notes for IDT77222/252 Windows NDIS5 ATM Device Driver, version 1.3
    Release Notes for IDT77222/252 Windows NDIS5 ATM Device Driver, version 1.3
    2022-11-19 23:35:03下载
    积分:1
  • java写的 动态互动景观全景好的例子代码
    java编写的 动态互动景观全景好的例子代码-prepared by the dynamic interaction panoramic landscapes good example code
    2022-02-20 15:34:35下载
    积分:1
  • 重载成员函数使CAsyncSocket类支持IPX/SPX协议
    重载成员函数使CAsyncSocket类支持IPX/SPX协议-reload the member function to make class CAsyncSocket support IPX/SPX protocol
    2022-03-06 12:14:17下载
    积分:1
  • 696518资源总数
  • 106227会员总数
  • 11今日下载