登录
首页 » Windows Socket编程 » C2风格的局域网聊天程序,实现局域网中两个Client聊天。这个程序分Server和Client两部分,但是和网上流行的Server与Client聊天不同,它是...

C2风格的局域网聊天程序,实现局域网中两个Client聊天。这个程序分Server和Client两部分,但是和网上流行的Server与Client聊天不同,它是...

于 2022-12-17 发布 文件大小:12.82 MB
0 61
下载积分: 2 下载次数: 1

代码说明:

C2风格的局域网聊天程序,实现局域网中两个Client聊天。这个程序分Server和Client两部分,但是和网上流行的Server与Client聊天不同,它是实现的Client与Client 聊天,Server 仅仅提供消息转发功能,因此执行程序时,首先必须有两台以上的电脑来执行,必须保证两个Client(Client程序是相同的,因此只要复制两个Client就行)在不同的局域网上的电脑,局域网中只要有一个Server就行,通过输入IP以及确认码(其实就是端口号,要保证两个Client的端口号相同,且两个Client的IP地址不同,即不在同一电脑上),就能实现一个Client和另一个Client聊天(当然Server必须运行,且必须按提示输入信息),本程序基于UDP协议,并且利用多线程编程实现了程序的背景音乐(系统的Beep声音必须打开才能听见)以及正常退出功能(点右上角的“差”是非正常退出!),当初设计的时候使得两个Client端口号必须相同,今后会设计出两个Client端口号不同,这样就能在一台机子上执行程序了。 -This program has the function that it can make two Clients communicate on the LAN.The program has Server and Client two parts.However,it is different from the popular CS chat program which has the function of communicating from Server and Client on the web.It makes two Clients chat.The server only be assigned to transmit messenger from one Client to another.So,you should have more than two Computer to run the program,and to ensure that two Clients on the different Computers which is on the same LAN.The LAN has one Server is OK

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

发表评论

0 个回复

  • 696522资源总数
  • 104022会员总数
  • 48今日下载