message-io 0.19.0

Fast and easy-to-use event-driven network library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mod common;
mod sender;
mod receiver;

pub fn main() {
    let args: Vec<String> = std::env::args().collect();
    match args.get(1).unwrap_or(&String::new()).as_ref() {
        "send" => match args.get(2) {
            Some(file_path) => sender::run(file_path.into()),
            None => println!("The sender needs a 'file path'"),
        },
        "recv" => receiver::run(),
        _ => println!("Usage: recv | (send <filepath>)"),
    }
}