topheman / snake-pipe-rust

🦀 A snake game based on stdin/stdout (+tcp and unix sockets) in rust
MIT License
12 stars 1 forks source link

[Feat] Implement `snakepipe socket-play/watch` based on Unix socket #35

Closed topheman closed 4 months ago

topheman commented 7 months ago

Currently, we can do:

# mirror terminal
cat /dev/null > /tmp/snakepipe.sock && tail -f /tmp/snakepipe.sock|snakepipe render
# master terminal
snakepipe gamestate|tee /tmp/snakepipe.sock|snakepipe render

Those aren't real unix sockets, it's just a simple file tailed. Lets make an implementation with unix sockets.

Proposition:

Allow overriding the address of the socket (have a default one)

Questions / Constraints