Git Product home page Git Product logo

tcpfiledownloader's Introduction

TCP File Downloader

A program that downloads a file from the Internet given a URL over TCP. Watch a gif of me interacting with it below!

photo  

Features

  • Supports both HTTP and HTTPS URLs; if the protocol is HTTP, a regular Socket is used to establish a TCP connection; if the protocol is HTTPS, a secure connection is established with the server using an SSLSocket.
  • Operates in non-persistent HTTP mode; once the object is downloaded, the client closes the underlying TCP connection.
  • URLs must be properly formatted with the following syntax: protocol://hostname[:port]/pathname, where protocol is either HTTP or HTTPS, hostname is the name of the web server, [:port] is an optional part which specifies the server port (default is 80 for HTTP and 443 for HTTPS), pathname is the path of the requested object on the specified host.
  • Reads the server response line by line to first identify the end of the header fields (by looking for \r\n), and then reads the remainder of the server's response (the file itself) chunk-by-chunk using a buffer for improved performance.

If you want to start up the project on your local machine:

  1. Download the code as a ZIP:

    download  

  2. Unzip the code:

    file  

  3. Open the folder in an IDE, such as VSCode:

    code  

  4. Obtain the URL of a file from the internet, copy it. Then, run the code by doing

       java ClientDriver -u <url_copied_from_internet>
    



photo  

  1. Interact with the file as you please!

    enjoy

tcpfiledownloader's People

Contributors

prempreetbrar avatar

Watchers

 avatar

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.