Git Product home page Git Product logo

ncsu-csc-401-networking's Introduction

CSC-401 P2P Project

  • Jesse Liddle - jaliddl2 - 200038471
  • Alex Micklow - ajmicklo - 200022174

This project is a peer-to-peer sharing system. There is a server that the peer connects to, by passing it's hostname and an open port that it is listening to, and then they push a list of the files(RFC) they are sharing to that server. From there if there is another peer that wants to download the file it simply gets the hostname and port number of the host for the file and downloads it from the peer.

The server is listening on port 7734 for all incoming connections to the server. When a client connects to the server it first hands the server it's hostname and an open port number that the client is listening for other peers to connect to it over. If a peer wants to download an RFC from another peer it tells the server which RFC edition it wants then it sends the information about that host back to the client and then the client establishes a connection with the other peer to download the file.

To run the server side program first you must compile these files:

  • Peers.java
  • RFC.java
  • CustomLinkedList.java
  • Server.java

Once all of those file have been compiled you can start the server by running the Server file. Once the server is running you can end it by pressing crtl+c at any time and it will display a message "Shutting down" and will close the open server port and exit.

To run the client side program first make sure that the RFC files are in the same directory as the Client.java file. Then compile and run the Client.java file and the client will be running.

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.