https://github.com/gistrec/file-broadcaster
UDP File sender and receiver using BROADCAST address
https://github.com/gistrec/file-broadcaster
broadcast-address packets receiver sender udp
Last synced: 2 months ago
JSON representation
UDP File sender and receiver using BROADCAST address
- Host: GitHub
- URL: https://github.com/gistrec/file-broadcaster
- Owner: gistrec
- License: mit
- Created: 2019-01-10T14:14:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-07T17:33:15.000Z (over 5 years ago)
- Last Synced: 2025-04-23T01:11:47.684Z (3 months ago)
- Topics: broadcast-address, packets, receiver, sender, udp
- Language: C++
- Size: 34.2 KB
- Stars: 57
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# File-Broadcaster
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
- [Requirements](#requirements)
- [Download](#download)
- [Installation](#installation)
- [Script Parameters](#script-parameters)
- [Packets Specification](#packets-specification)
- [Script Specification](#script-specification)## Download
Clone the [source repository](http://github.com/gistrec/File-Broadcaster) 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](http://windows.github.com/) or [Github for Mac](http://mac.github.com/) instead of the command line, however these aren't tested/supported and we only use the command line for development. Use [this link](https://git-scm.com/downloads) 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
## 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