-
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
-
Adaptive-median-filter
基于vc++的自适应中值滤波器的代码,能用于对相位图的滤波。(The adaptive median filter code can be used for the filtering of the phase diagram.)
- 2021-02-26 19:59:37下载
- 积分:1
-
nt_service
VB做的系统服务 nt_service
包含NTSVC.ocx在里面(VB nt_service)
- 2010-01-12 09:18:10下载
- 积分:1
-
3Dnetwork
程序分2部分,一部分是用C++编写,负责显示3D效果,另一部分是由C#编写,负责网络通信(Program in 2 parts, one written with C++, responsible for displaying the 3D effect, the other is written by the C# is responsible for network communication)
- 2010-10-18 17:00:48下载
- 积分:1
-
Savitzky-GolayPFilter
Savitzky-Golay 滤波算法的资源汇总,原理阐述(Savitzky-Golay filtering algorithm resource summary, the principle expounded)
- 2013-01-20 10:40:39下载
- 积分:1
-
STM32F10x-USART
stm32F10X系列的USART应用实例(含说明文档),入门以及应用的时候可以参考。(An example of application of USART stm32F10X series(pdf intrudution includeed), useful and easily when allpied.)
- 2013-03-21 09:01:45下载
- 积分:1
-
31701012836
C++编写的简单分数类(包含复制,约分,四则运算等)(Simple fraction classes written in C++ (including duplication, reduction, four operations, etc.))
- 2019-06-11 12:01:16下载
- 积分:1
-
doceditor
说明: 记事本源码,类似写字板的VB6文档编辑器实例程序(Notepad source code, sample program similar to WordPad VB6 document editor)
- 2020-06-22 19:54:25下载
- 积分:1
-
Foundations_of_CPlusPlus-CLI
说明: 說明在.NET 3.5中,Visual C++的資料型態及使用(Indicate. NET 3.5 in, Visual C++ data types and use of)
- 2010-04-19 15:17:45下载
- 积分:1
-
485546
设置列表控件的显示方式,VC++精选编程源码,很好的参考资料。(Set display mode list control, VC++ programming source code, a good reference.)
- 2013-12-01 14:08:17下载
- 积分:1