Coder Social home page Coder Social logo

simple_p2p's Introduction

Simple P2P

Project for the Internet Technologies classes at the Faculty of Electronics and Information Technologies, Warsaw University of Technology.

The aim of this project was to invent and implement a simple peer-to-peer protocol for exchanging files in a local network.

Authors

Przemysław Stawczyk

Maciej Szulik

Kamil Zacharczuk

Wiktor Michalski

Requirements

You should have installed:

  • cmake
  • Boost

Compile program

Run ./create_configs.sh first.

  • If you would like to compile the Release version, run: cd build/Release; make

  • If you would like to compile the Debug version, run: cd build/Debug; make

Run program

  • If you would like to run the Release version: ./bin/Release/Simple_P2P --my_ip 'IP address to bind' --broadcast_ip 'your local network broadcast address'

  • If you would like to run the Debug version: ./bin/Debug/Simple_P2P --my_ip 'IP address to bind' --broadcast_ip 'your local network broadcast address'

Usage

Type in help inside the running program to see available commands.

Testing guide

Requirements

You should have installed:

  • docker 18.09+
  • docker-compose 1.24+

Run containers

Run N instances of the program to simulate a network:

docker-compose -p simple_p2p up -d --build --scale host=N

Enable user input from one of running hosts

Run

docker attach simple_p2p_host_N

where N is a host id.

Access to container

To access to the container (not to the program user input) to create or read files run:

docker exec -it simple_p2p_host_N bash

where N is a host id.

Show container logs

Run

docker logs simple_p2p_host_N

where N is a host id.

Stop testing

Run

docker-compose -p simple_p2p down

Debug mode

If you would like to debug the program in your IDE, go to docker-debug directory and run default command to run containers. Configure your IDE to attach to one of the containers and run the program with debugging tools.

simple_p2p's People

Contributors

kazach7 avatar przestaw avatar

Watchers

 avatar  avatar  avatar

simple_p2p's Issues

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.