Skip to content

A sample tokio server that presents a simple command line interface to multiple connecting clients.

License

Notifications You must be signed in to change notification settings

mike-bourgeous/cliserver_rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cliserver_rust

WIP - Much TODO

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.

Compiling cliserver_rust

Compile the server with cargo build, run it with cargo run. Connect to the server using netcat: nc localhost 14311.

Copyright

(C)2017 Mike Bourgeous, licensed under 2-clause BSD

About

A sample tokio server that presents a simple command line interface to multiple connecting clients.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages