-
client-server
多协议文件传输c/s网络应用设计与实现,程序用 TCP/UDP 两个协议模拟多协议服务器。首先服务器端要将两种协议的套接字创建好,并且监听 TCP 端口的连接。必要时使用select函数来进行多连接处理和非阻塞处理。而客户端直接可以按照发送的地址和端口号来进行通讯。
首先要运行服务器端,服务器会监听 TCP 端口。然后运行客户端,根据事先设定好的 IP和端口,就可以进行连接传输数据了。
程序实现的关键步骤:
以TCP协议为例
服务器端:
1.创建套接字;2.绑定端口;3.进入无穷的循环;4.接收请求;5.处理请求;6.应答。
客户端:
1.找到服务器的IP地址和协议的端口号;2.创建套接字;3.确定连接需要任意的,没有使用的端口号允许TCP去选择一个;4.将套接字和服务器连接;5.使用应用层协议和服务器交互;6.关闭连接。
(Multi-protocol file transfer c/s network application design and implementation of programs simulate multi-protocol server with TCP/UDP both protocols. First socket server to create a good two protocols, TCP port and listens for connections. If necessary, use the function to handle multiple connections and non-blocking treatment. And the client can follow directly address and port number to communicate.
First run on the server side, the server listens on TCP port. Then run the client, according to pre-configured IP and port, you can connect the data transmission.
The key step program implementation:
In TCP protocol as an example
Service-Terminal:
1. Create a socket 2 bound port 3 enter an infinite loop 4. receiving a request 5. processing requests 6 response.
Clients:
1. Locate the server s IP address and protocol port number 2 creates a socket 3 connections need to determine arbitrary, unused port allows TCP to choose a 4 and the socket server connections 5 using appli)
- 2016-07-11 10:19:07下载
- 积分:1
-
chat实例
基于VC++的局域网聊天室,能够实现多人房间聊天。(LAN chat room based on VC++ can realize multi-room chat.)
- 2019-02-15 10:30:43下载
- 积分:1
-
5756450
模拟MFC实现动态创建,结合文章使用,很不错的()
- 2018-06-15 06:19:16下载
- 积分:1
-
Winsckdownloader
实时HTTP下载控件
一个实时显示进度条的HTTP下载控件,使用WINSOCK,支持断点续传。速度。使用mschart控件,计量比较准确.(HTTP download real-time control of a real-time display of HTTP download progress bar control, the use of WINSOCK, Supporting HTTP. Speed. MSChart use controls, a more accurate measurement.)
- 2009-03-14 17:22:37下载
- 积分:1
-
VBIP
显示和修改网卡地址和网关.DNS Visual Basic编程.(Display and modify the network card address and gateway. DNS Visual Basic programming.)
- 2013-11-04 10:26:51下载
- 积分:1
-
lyzz23
本程序以动态的方式给对话框加载背景图,给人耳目一新的感觉()
- 2018-04-28 12:12:12下载
- 积分:1
-
INNETER-IC
网络重传选择协议,可以检查传输信息的正确性。通过接受方的校检,通知发送方重新发送。
(
Network retransmission protocol, you can check the correctness of the transmission of information. By accepting the prosecution s school to notify the sender to resend.)
- 2015-10-14 09:19:13下载
- 积分:1
-
SerialPort_vc
一个关于串口通信编程的小程序,使用visual c++编写。(Serial communication programming on small procedures, the use of visual c++ Prepared.)
- 2007-07-16 15:57:05下载
- 积分:1
-
DMMidddleWare
部署在服务器公网上 实现内外网通讯的源码,外部程序连接到这个程序,这个程序再连接内部服务器(Deployed on the server the public Internet to achieve internal and external network communication)
- 2012-02-10 15:46:10下载
- 积分:1
-
resiveDlg
c++聊天软件客户端代码,可以实现和双方互相聊天,必须客户端后启动(c++ chat software client code)
- 2013-08-11 19:10:03下载
- 积分:1