protohackers/problem_04
2023-05-01 12:10:43 +02:00
..
bin ADd client and README 2023-05-01 12:10:43 +02:00
.gitignore First echo server barebones for problem_04 2023-05-01 08:02:04 +02:00
Cargo.toml First echo server barebones for problem_04 2023-05-01 08:02:04 +02:00
README.md ADd client and README 2023-05-01 12:10:43 +02:00

Usage

Star the server

$ cargo run --bin server

or with logs:

$ RUST_LOG=info cargo run --bin server

Test with the client

$ cargo run --bin client 127.0.0.1:1222 "foo=bar"

Example output

$ cargo run --bin client 127.0.0.1:1222 "foo=bar"
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/client '127.0.0.1:1222' foo=bar`
Insert request sent. No response expected.

$ cargo run --bin client 127.0.0.1:1222 "foo"
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/client '127.0.0.1:1222' foo`
Received response: foo=bar