A simple interactive command-line server built in Rust using Tokio. This was built as a learning exercise for myself to translate my knowledge of libevent in C and EventMachine in Ruby to Rust. It is based in concept on my original cliserver example code for libevent, using the Tokio echo server example to get started.
Clients connect to the server on port 14311, allowing them to run the following commands:
- echo -- Print the command line.
- help -- Print a list of commands and their descriptions.
- info -- Print connection information.
- quit -- Disconnect from the server.
- kill -- Shut down the server.
Compile the server with cargo build
, run it with cargo run
. Connect to the
server using netcat: nc localhost 14311
.
(C)2017 Mike Bourgeous, licensed under 2-clause BSD