-
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
-
iocomp4
iocomp4.02破解 支持WIN7 8 10 64 32(iocomp4.02 SUPORTWIN7 8 10 64 32)
- 2020-06-28 23:00:01下载
- 积分:1
-
tf-idf一种计算方法
tf-idf一种计算方法
- 2014-07-02下载
- 积分:1
-
使用opnet 仿真采用TDMA组网方式得无线局域网,查看网络性能
使用opnet 仿真采用TDMA组网方式得无线局域网,查看网络性能-Using OPNET simulation using TDMA组网方式a wireless LAN, check network performance
- 2022-02-04 19:00:52下载
- 积分:1
-
Linux下USB转储
linux的usb转储程序。日志的测试文件。linux的usb转储程序。日志的测试文件。
- 2023-04-19 01:05:03下载
- 积分:1
-
IP
说明: IP 流量包抓包分析 能实现简单的监控IP 流量的功能(IP traffic packet capture analysis to achieve a simple monitoring IP traffic)
- 2012-05-17 10:06:43下载
- 积分:1
-
多线程端口扫描演示,能够设置连接延时,使用Winsocket2 API编写,Delphi7编译通过
多线程端口扫描演示,能够设置连接延时,使用Winsocket2 API编写,Delphi7编译通过-multithreaded port scanning demonstration connecting to delay, the use of API Winsocket2 prepared by compiling Delphi7
- 2022-03-26 04:26:50下载
- 积分:1
-
C# 局域网端口扫描 实例下载
局域网端口快速扫描
- 2020-12-04 16:39:24下载
- 积分:1
-
DBN_RBM1.1
深度信网络测试代码,可以帮助初学者很好地了解深度学习。(Depth communications network test code that can help beginners a good understanding of the depth of learning.)
- 2014-10-31 09:37:18下载
- 积分:1
-
蚁群算法
说明: 根据蚁群算法解决三维路径规划的问题,得到三维的路径图(According to the ant colony algorithm to solve the problem of three-dimensional path planning, get the three-dimensional path map)
- 2020-10-15 11:30:07下载
- 积分:1