-
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
-
Article_demo
c#开发环境,用于实现带进程、向导或操作步骤信息的显示(c# show process or flow info )
- 2012-01-07 16:40:48下载
- 积分:1
-
ImageShow - 副本
图像的ROI区域选取,对图像的二值化与旋转处理(ROI region of the image, the image of the two values and rotation processing)
- 2017-07-31 11:00:56下载
- 积分:1
-
nativequickwidgets-0.1
QT + QML 用QML实现QT的基本控件。包括label,button(QT+ QML)
- 2012-06-19 08:52:31下载
- 积分:1
-
SendSMS2_SDK30_VB6_20040414
source code vb6 to send sms to gsm module
- 2015-07-01 01:33:46下载
- 积分:1
-
Compiler-C
compiler on c++
good luck
- 2014-01-23 00:45:17下载
- 积分:1
-
4575438674654
VB写的企业营销管理系统(MSSQL),值得研究。(VB write enterprise marketing management system (MSSQL), is worth studying.)
- 2013-08-03 18:53:46下载
- 积分:1
-
testmediaanaJpeg_xvid
从一个mpeg4视频文件中,抓取给定起始结束时间段内的图像,保存为jpeg格式,使用directshow实现(From a mpeg4 video file, the crawl a given time period starting the end of the image, save it as a jpeg format, the use of DirectShow realize)
- 2008-08-12 11:51:21下载
- 积分:1
-
串口调试工具及源代码
说明: 非常好用的串口变成工具和源代码,可以自动搜索串口,有非常高的参考价值。(it is very nice! you can use it easyly, it is Visul C++ code .)
- 2019-02-22 14:38:35下载
- 积分:1
-
pcrecord
该程序能够直接将将录制的声音转换成MP3文件,具有操作简单方便的优点。详细的实现请参考源码。(The program will be able to record sound directly into MP3 files, with the advantages of simple operation. Detailed implementation please refer to source code.)
- 2010-01-04 14:41:34下载
- 积分:1