A TCP multi-broadcast media streaming server/client. [Check out the past source](/Fierelier/fstream/src/commit/1890b316f543f579e9a63f3a2ddb689eeef9c855), for simpler implementation. **Compatible with Python 3.4 and up!**
Accepts data from stdin, and sends it to the specified server.
### Arguments
- **`user`**: Your user's name.
- **`user-password`**: Your user's password.
- **`channel`**: The channel you wanna stream to. Can be any name.
- **`channel-password`**: The channel's password.
- **`loop-delay`**: How long should the server wait between each acquisition of data, in seconds? Higher values will cause more delay, but will also store more data in the backlog (good for laggy watchers). Lower values for lower delay.
Broadcast Windows desktop as `fier` to `127.0.0.1:61920`, supplying `123` as the user password with a server loop-delay of `0.1` seconds. `exampleChannel` is the channel, `456` is the channel's password. Pipe the output from ffmpeg.
Edit `modules/settings.py` for generic server/socket-related settings, and `modules/fstream/settings.py` for fstream related settings.
## Creating a user
Make a folder called `users` and make a file in it called `YourUsername.ini`, put this in it:
```ini
[DEFAULT]
password=foobar
```
If you would like to implement your own authentication, make your own module to replace the `authenticate()` function - see `modules/fstream/authent.py` and `modules/fstream/main.mods`.
Establish a TCP connection with the server, and send the payload. If the server likes your payload, it will stream data to you, or accept more of your data.
Send the length of the payload as a 4-byte (32-bit) big endian unsigned integer, a null byte (hex:`00`) and a UTF-8 encoded string identifying the client's intentions follows, for example: `watch,user=fier,channel=exampleChannel,channel-password=123` or `broadcast,user=fier,user-password=123,delay=0.1,channel=exampleChannel,channel-password=456`. The length includes only the string message, in bytes, it does not include the length itself, nor the null byte.