GithubHelp home page GithubHelp logo

lftp's Introduction

LFTP

Introduction

  • Use UDP as the transport layer protocol
  • Realize 100% reliability as TCP
  • Implement flow control function similar as TCP
  • Implement congestion control function similar as TCP
  • Be able to support multiple clients as the same time

Usage

  • Server
    g++ server.cpp main.cpp -o LFTP -lwsock32 -std=c++11    ## 编译
    LFTP.exe                                                ## 启动服务器
  • Client
    g++ client.cpp main.cpp -o LFTP -lwsock32 -std=c++11    ## 编译
    LFTP.exe lget server file                               ## 使用legt
    LFTP.exe lsend server file                              ## 使用lsend
    • Demo
      lftp.exe lget 127.0.0.1:8888 server.txt
      lftp.exe lsend 127.0.0.1:8888 ../data/client.txt

Note

  • Each client can only support one operation(lsend or lget) at a time.
  • The default port used by the server is 8888, the port can be modified by the default port of the Server constructor
    • Server(string _dir = "../data/", int port = 8888)
  • The default receive transfer file is stored in the ../data/ directory,both of the server and client
  • When using lsend, you need to give the file path relative to src, use relative path only for /
  • Please input the command parameters as required, otherwise unnecessary errors will occur

Design

Test

lftp's People

Contributors

liu-yt avatar

Stargazers

Floyd avatar Bill Zhao avatar  avatar

Watchers

James Cloos avatar

Forkers

ronald-247533

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.