m32chat/README.md

24 lines
1.4 KiB
Markdown
Raw Normal View History

2023-10-04 08:38:25 +02:00
# m32chat
2023-10-04 09:08:11 +02:00
m32chat is a simple chat server for the [Morserino](https://www.morserino.info/).
2023-10-04 08:38:25 +02:00
2023-10-05 08:39:30 +02:00
It is (more or less) a reimplementation of the Python2.7 script [m32_chat_server](https://github.com/sp9wpn/m32_chat_server).
2023-10-04 08:38:25 +02:00
The m32chat service listens on port 7373 for UDP messages and rebroadcasts them to the other subscribed Morserino clients.
2023-10-04 09:11:25 +02:00
To subscribe to the service, just send the message `hi` from your Morserino. The server will respond with `:hi` and the number of clients connected (1 means you're alone).
2023-10-04 08:38:25 +02:00
2023-10-04 09:09:14 +02:00
If a client is inactive for a certain time, it will be removed from the subscriber list. The server then sends the message `:bye` to this client. You can also force the removal by sending the message `:bye`.
2023-10-04 08:38:25 +02:00
Additional notes:
2023-10-05 13:04:16 +02:00
- Periodically, empty UDP packets are being sent to avoid NAT timeouts.
2023-10-04 11:25:09 +02:00
- The number of clients is restricted (to avoid abuse).
2023-10-05 13:04:16 +02:00
- A small delay is introduced (to avoid abuse).
2023-10-06 08:00:51 +02:00
## Installation
For compiling m32chat, you only need a recent Rust toolchain. [rustup.rs](https://rustup.rs/) could help you with it.
- After getting the source code, you can compile it with `cargo build --release`.
- Copy the binary for example to `/usr/local/bin/`.
- You can use the systemd template for m32chat and adapt it to your needs (i.e. customize the user name under which the service should run).
Setting the environment variable `RUST_LOG=Debug` will give you some debug messages.