Giter VIP home page Giter VIP logo

file-broadcaster's Introduction

File-Broadcaster

Build status Code quality Release Code quality License

UDP File sender and receiver
Can use broadcast address to send file on all computers in LAN

Features

  • Send file to one or all computers in LAN
  • Reliability of data transmission
  • Server timeout detection
  • Change MTU

Overview

Download

Clone the source repository from Github.

  • On the command line, enter:

    git clone https://github.com/gistrec/File-Broadcaster.git
    git submodule init
    git submodule update --recursive --remote
    
  • You can probably use Github for Windows or Github for Mac instead of the command line, however these aren't tested/supported and we only use the command line for development. Use this link to download the command line version.

Requirements

  • Windows:
    • Visual Studio 2015 or 2017
  • Linux:
    • g++
    • pthread
    • arpa

Installation

  • Windows
    • Open FileBroadcaster.sln via Visual Studio
    • Build project
  • Linux
    • Open a terminal/console/command prompt, change to the directory where you cloned project, and type:
      make all
      

Script Parameters

Parameter Default Description
p, port 33333 Sender and receiver port
f, filename none Transmitted and received file
t, type receiver receiver or sender
ttl 15 Seconds to wait cliend requests or sender responses
mtu 1500 MTU packet size
broadcast 255.255.255.255 Broadcast address. Can use to unicast.

Packets Specification

Packets structure alt text

Script Specification

  1. Sender send NEW_PACKET packet to broadcast (or unicast) address
  2. Sender send all parts of file via TRANSFER packet
  3. If any pacckets were lost, receiver ask them sending RESEND packet to broadcast (or unicast) address
  4. Sender wait RESEND packets or wait TTL and turns off
  5. Receiver ask all lost parts, until the whole file is no downloaded or wait TTL and turns off

file-broadcaster's People

Contributors

gistrec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

davidmather

file-broadcaster's Issues

INADDR_BROADCAST don't use right broadcast address

Need check how INADDR_BROADCAST work
If IPv4 address: 192.168.100.57
And Subnet mask: 255.255.255.0
Broadcast address must be: 192.168.100.255

No work: broadcast_address.sin_addr.s_addr = INADDR_BROADCAST;
Work: broadcast_address.sin_addr.s_addr = inet_addr("192.168.100.255");
But first line must work too!

Cant access broadcast

Hi love your code but when i run i got

Ok: Socket created
Error: Cant't get access to broadcast

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.