linebased
Line based TCP server
About
Simple line-based TCP server for implementing command interfaces. There's no authentication or TLS support. Commands are handled synchronously as in Redis. The server uses an event loop internally to multiplex client connections.
Usage
let config = default
.host
.port
.max_clients
.client_buf_size
.welcome_message
.prompt;
let mut server = new.unwrap;
// server is a `Handle`. Call `join` when you want it to stop. It's running on a
// thread.
server.join.unwrap.unwrap;
This can be accessed over netcat like so:
jwilm@jwilm-desk ➜ nc localhost 7343
Connected
> arst
unknown command
> version
0.1.0