Code Monkey home page Code Monkey logo

computer-networks's Introduction

Assignment:

Usage ./peer <IP> <Port of Remote Machine> <Port of Your Machine>

  1. An "IndexGet" request which can request different styles of the same index of the shared folder on the other client as listed below.

a. A "ShortList" request indicating that the requesting client wants to know only the names files chosen from the time-stamps specified by the requesting client, i.e., the client only wishes to learn about a few files.

E.g., Sample request: IndexGet ShortList starting-time-stamp ending-time-stamp

The response includes the "names", "sizes", "last modified" time-stamp of the files

b. A "LongList" request indicating that the requesting client wants to know the entire listing of the directory of the shared folder including the "names", "sizes", "last modified timestamp"

c. A "RegEx" request indicating that the requesting client wants to know the list of files that contain the regular expression pattern in their file names. The response includes all the file names which "contain" the regular expression pattern in their names.

E.g., IndexGet RegEx '*mp3'

  1. A "FileHash" request indicates that the client to enable the client to check if any file's content has changed. Two types of "FileHash" are supported:

a. A "Verify" request which gives the name of the file that the client wants the hash for. The response contains the MD5 hash of the file and the name of the file and last modified time stamp.

E.g., FileHash Verify Name-of-file

b.A "Check All" request which is used to periodically check for modifications in the file. The response includes the hashes of all the files, their names and the last modified time stamp.

E.g., FileHash CheckAll

  1. A "FileDownload" request, which includes the name of the file that the client wants to download. The response includes the File, the file name, the file size, the MD5 hash and the time-stamp when the file was last modified.

E.g., FileDownload Name-of-file

  1. A "FileUpload" request, which includes the name and size of the file that the client wants to upload.The other client can either end a"FileUploadDeny"or "FileUploadAllow" response. The client uploads the file,its md5 hash and the time-stamp if it receives a"FileUploadAllow" response. If it gets a "FileUpload Deny" then the client goes back to listening for other requests.

E.g., FileUpload Name-of-file

Computer-Networks

computer-networks's People

Contributors

shubhamrathi avatar

Watchers

James Cloos avatar  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.