"Python practice" socket-based FTP program v1.1.0 (supports concurrency)

Source: Internet
Author: User

Add Features
1.在FTP(1.0.0)的基础上,支持了多并发的功能2.允许配置最大并发数,比如允许只有10个并发用户
Program function:
本程序模拟实现了一个FTP程序:1.程序分为客户端和服务端2.用户可以登录和注册账号,登录密码有MD5加密3.每个用户有自己的家目录 ,且只能访问自己的家目录4.用户可以随意切换目录(仅限自己的家目录)5.允许用户查看当前目录下文件6.允许上传和下载文件,保证文件一致性(md5),(不允许下载/上传文件夹,会出现不可恢复bug,用户配置文件需要重置。时间原因没有加判断)7.文件传输过程中显示进度条8.支持文件上传、下载的断点续传
Test:
数据为空,需要手动创建添加1.需要自行注册账号2.本地上传的文件,应放在client\db\用户名\uploads中3.下载的文件会自动存储在client\db\用户名\downloas中4.不能下载/上传文件夹,会出现不可恢复bug
Program Structure:

mythreadpool.py is only added under core

FTP/└── ├── README     ├── client # 客户端程序目录    └── server # 服务端程序目录
  ftp/client/└──├──conf # configuration File │├──init.py│└──settings.py├──core # Main program logic is │├──init. py│├──login.py # Login Module │├──main.py # main logic Interactive Program │└──register.py # Register module ├──DB #用户数       According to the stored place │└──disk # Store each user upload \ download file │├── username File 1 # username file ││├──downloads # download file directory │               │└──uploads # file directory to upload │└── username file 2 # user name file │├──downloads # downloaded file directory │ └──uploads # file directory to upload └──ftp_client # Client terminal program main portal  
FTP/server/└── ├── conf # 配置文件    │   ├── init.py    │   └── settings.py    ├── core # 主要程序逻辑都    │   ├── init.py    │   ├── logger.py       # 日志记录模块    │   ├── login.py        # 登陆模块    │   ├── main.py         # 主逻辑交互程序    │   ├── MyThreadPool.py # 线程池    │   └── register.py     # 注册模块    ├── db #用户数据存储的地方    │   ├── accounts.ini  # 用户配置文件,存放账号、密码(MD5)    │   └── disk # 存放各用户上传\下载文件    │        ├── 用户名文件1 # 用户名文件    │        │       ├── downloads # 下载的文件存放目录    │        │       └── uploads # 需要上传的文件目录    │        └── 用户名文件2 # 用户名文件    │                ├── downloads # 下载的文件存放目录    │                └── uploads # 需要上传的文件目录    └── logs #日志目录    │   ├── init.py    │   └── access.log #用户访问和操作的相关日志    └── FTP_server # server端程序主入口

"Python practice" socket-based FTP program v1.1.0 (supports concurrency)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.