lopuh@void:~/projects/ttf$

// transfer text files over LAN

$ stat project.info
Name: ttf (transfer text files)
Type: local network file transfer
Protocol: TCP over LAN
Status: "functional"
Language: C++

$ cat description.txt

// Project Description
Provides sending text files from one device to another
using LAN. Useful when you want to quickly and clearly
share files locally. Run server on one device and
client on the other.

$ bash script.sh

# Usage (Unix system):
# Execute shell script for compiling:
$ bash script.sh
# Then use binary files:
$ ./server
$ ./client

# Or compile manually with g++:
## 1. Compile server:
$ g++ src/server.cpp src/ttf_net.cpp src/ttf_server.cpp -o server

## 2. Compile client:
$ g++ src/client.cpp src/ttf_net.cpp src/ttf_client.cpp -o client

# NB: Files must be in "files/client_files/" and
# "files/server_files/" folders, or configure paths.
# To send a file, type filename with extension:
"file.txt"

$ cat ~/.bashrc | grep TTF

# Configuration
# Set in ~/.bashrc or ~/.zshrc:
export TTF_client="path/to/your/folder" # send files
export TTF_server="path/to/your/folder" # receive files

# Example:
export TTF_client="$HOME/ttf_files/send"
export TTF_server="$HOME/ttf_files/receive"

# Reload shell configuration:
$ source ~/.bashrc
# or
$ source ~/.zshrc

$ ls -la media/

$ ./server & ./client

# Example usage:
## Device A (server):
$ ./server
[INFO] Server started on 0.0.0.0:8080
[INFO] Waiting for connections...

## Device B (client):
$ ./client 192.168.1.100 8080
[INFO] Connected to 192.168.1.100:8080
[INFO] Available files:
1. notes.txt
2. config.yaml
3. todo.md
> notes.txt
[INFO] Sending notes.txt (1.2KB)...
[INFO] Transfer complete

$ cat TODO.md

// Future Development
[ ] script for bash
    automated setup and usage

[ ] web client
    browser-based interface

[ ] tg-bot / discord bot
    messaging platform integration
C++
TCP
LAN
Unix
Bash
Files
Network
Text
$ tree -I '*.o|*.so' --dirsfirst
.
├── src/
│ ├── server.cpp
│ ├── client.cpp
│ ├── ttf_net.cpp
│ ├── ttf_server.cpp
│ └── ttf_client.cpp
├── files/
│ ├── client_files/
│ └── server_files/
├── script.sh
├── server
├── client
└── README.md

$ file server client
server: ELF 64-bit LSB executable, x86-64
client: ELF 64-bit LSB executable, x86-64