Skip to content

P2P file sharing software for CNT4007: Computer Network Fundamentals

Notifications You must be signed in to change notification settings

anandmathi/p2p-file-sharing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P2P File Sharing

Overview

P2P file sharing software. Peers share handshake and bitfield messages with each other when a connection is formed. After, the peers use choke, unchoke, request, have, piece, interested, and not interested messages to distribute the data to all peers in the network.

Completed Features

We completed all features outlined in the document. All messages are sent and received properly. Peers will choke and unchoke based on the unchoking interval and optimistic unchoking interval. Peers will send interested and not interested messages based on the info they have about other peers' bitfields. Major operations are logged in the respective log files.

Demo Video

Contributors

Group 35:

  • Kory Gauger ([email protected])
    • MessageHandler class (message generation)
    • ChokeHandler class
    • Debugging
  • Kyeonghan Lee ([email protected])
    • Common.java file
    • ConfigParser.java file
    • Debugging
  • Anand Mathi ([email protected])
    • ConfigParser class (reads data from config files)
    • Logger class (logs events in peer's log file)
    • peerProcess class (main method)
    • Input validation, environment cleanup, & initialization
    • Managing TCP connections in Client & Server classes
    • Peer class
    • Handshake
    • Message processing and sending
    • Client & Server classes
    • Bitfield
    • Threading for ChokeHandler

Compilation & Running Instructions

To compile, run the following command in p2p-file-sharing/src:

javac ChokeHandler.java MessageHandler.java Peer.java Client.java Log.java Server.java peerProcess.java

To run, run the following command in p2p-file-sharing/src:

java peerProcess <peerId>

Ex. java peerProcess 1001

NOTE: peerId must match a peer in p2p-file-sharing/src/config/PeerInfo.cfg

About

P2P file sharing software for CNT4007: Computer Network Fundamentals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages