Code Monkey home page Code Monkey logo

file-transfer-system's Introduction

README

Anne Harris
CS 372 - 400
Project 2
Updated: 3/8/2019

This program acts as a file transfer program. It starts a server on one instance of flip and starts the client on the other.
It accepts two commands, -l (list) and -g (get). If the client sends any other commands the server will remain open but respond with an invalid message

-l command sends a list of the current files in the current working directory
-g sends the contents of a file from the current working directory and saves them as <FILENAME>_copy
If the file doesn't exist in the current working directory it will send an error message

The program can send files up to 160,000 bytes

The server will remain open and listening until the supervisor terminates with SIGINT (CTRL+C)
The client will close its connection after every request is complete

*NOTE*
***You must change the data port number for each new client request to avoid an error.***
You must ensure the <SERVER_HOST> matches the flip that the ftserver program is running on

Open two instances of flip (ex. flip2 and flip3 in seperate putty window)

1. make the server program executable by running: make ftserver
2. make the client program executable by running: chmod +x ftclient
3. Start the server on instance 1 of flip by running: ./ftserver <PORTNUM>
4. Start the client on instance 2 of filp by running: 	ftclient <SERVER_HOST> <PORTNUM1> <COMMAND> <DATAPORTNUM2>
							--OR--
							ftclient <SERVER_HOST> <PORTNUM1> <COMMAND> <FILENAME> <DATAPORTNUM3>

TO RUN:
Instance 1 of flip (server):
	make ftserver
On Instance 2 of flip (client):
	chmod +x ftclient
Instance 1 of flip (server):
	./ftsever <PORTNUM1>
On Instance 2 of flip (client):
	ftclient <SERVER_HOST> <PORTNUM1> <COMMAND> <DATAPORTNUM2>
	ftclient <SERVER_HOST> <PORTNUM1> <COMMAND> <FILENAME> <DATAPORTNUM3>
Instance 1 of flipe (server):
	ctrl+c



file-transfer-system's People

Contributors

akh5113 avatar

Watchers

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