47 lines
1.5 KiB
Markdown
47 lines
1.5 KiB
Markdown
# remchild
|
|
|
|
A remote child: a separate module that runs on another machine. Veskslop feeds it work, and it
|
|
returns results. Planned for STT, TTS, and later video and the desktop control app. See
|
|
[plan.md](plan.md) for the protocol, the heartbeat schedule, the naming rule, and the phases.
|
|
|
|
## Layout
|
|
|
|
| Path | What |
|
|
| --- | --- |
|
|
| `client/main.c` | The PoC client: C11, libc only, no runtime dependencies. |
|
|
| `client/words.h` | Generated from `words.json`; the client embeds the lists. |
|
|
| `words.json` | The two 128-word lists. The server and the generator read this file. |
|
|
| `server/server.mjs` | The PoC listener: allowlist, heartbeat states, ping test, history. |
|
|
| `plan.md` | The design and the phase list. |
|
|
|
|
## Build and run
|
|
|
|
```sh
|
|
cc -O2 -o remchild/client/remchild remchild/client/main.c
|
|
|
|
# On the machine that runs Veskslop:
|
|
node remchild/server/server.mjs --port 8799 --ips 192.168.1.5
|
|
|
|
# On the remote machine:
|
|
./remchild/client/remchild --server 192.168.1.5:8799
|
|
```
|
|
|
|
The client asks for the address when `--server` is absent. It prints the assigned name, then
|
|
accepts `p` (ping test) and `q` (quit).
|
|
|
|
Non-LAN addresses in the allowlist need the launch argument:
|
|
|
|
```sh
|
|
node remchild/server/server.mjs --port 8799 --ips 203.0.113.7 --allow-non-lan
|
|
```
|
|
|
|
## Test
|
|
|
|
```sh
|
|
node remchild/server/server.mjs --port 8799 --ips 127.0.0.1 &
|
|
./remchild/client/remchild --server 127.0.0.1:8799 --once
|
|
```
|
|
|
|
`--once` sends one hello and one ping, prints the welcome and the round trip, and exits. History
|
|
lands in `server/clients.jsonl` (gitignored).
|