-
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
-
DrawCircle
实现画圆,用C++的mfc功能,这个是c语言交互式绘图的必备!(Achieve Circle)
- 2013-12-20 00:20:37下载
- 积分:1
-
at91rm9200.c
atmel公司的At90系列嵌入式开发程序
可以学习别人良好的编程习惯(atmel' s At90 series of embedded development process can learn from others, good programming practice to)
- 2009-11-11 09:20:03下载
- 积分:1
-
channel_simulation
信道基本特性的仿真程序,包括小尺度衰落信道(频率选择性信道和时间选择性信道)的仿真,分集接收及误码率的仿真。(Channel basic characteristics of the simulation program. including small-scale fading channel (frequency selective channel and time-selective channel) simulation, Diversity reception and BER simulation.)
- 2007-01-05 08:38:50下载
- 积分:1
-
adb_ycnc
adb在VC6下的编译工程,带USB开发库,直接可编译成功。(adb complie by VC6)
- 2015-06-25 11:21:26下载
- 积分:1
-
yanhua_DLL
对研华运动控制卡API的封装,使调用更加简单,只需要几个函数即可完成80 以上的功能,同事提供DLL调用实例以及封装后的头文件和静态库文件(Advantech motion control card API package, making calls easier, you only need a few functions to complete more than 80 of the features, and colleagues provide examples DLL calls the header files and static library files encapsulated)
- 2014-12-12 15:26:09下载
- 积分:1
-
TTY
MFC的串口通信程序 能真确运行 经调试后无误(MFC serial communication program can be true and correct after running through debug)
- 2010-08-07 18:42:04下载
- 积分:1
-
3DSLoader_vtk
利用VTK读取3ds文件,并进行渲染的程序.(Use VTK to read 3ds files, and rendering process.)
- 2008-12-14 21:22:57下载
- 积分:1
-
motor_control
控制电机很好的代码。有速度环,位置环。推荐!!(Control motor very good code. The speed loop and position loop. Recommended! !)
- 2021-03-18 09:39:21下载
- 积分:1
-
cPP-21days
vc programming guide
- 2014-04-03 00:34:33下载
- 积分:1