2021-09-10 16:50:45 +00:00
|
|
|
# How-to: Test PTTH_QUIC
|
|
|
|
|
2021-09-10 17:42:46 +00:00
|
|
|
## Initial setup
|
|
|
|
|
2022-10-09 14:19:01 +00:00
|
|
|
- Open 3 terminals in `crates/ptth_quic`
|
|
|
|
- Use `export RUST_LOG=ptth_quic_relay_server=debug` to enable debug logging
|
2021-09-10 19:16:38 +00:00
|
|
|
for the terminal that will run the relay server (P3)
|
2022-10-09 15:30:57 +00:00
|
|
|
- Use `export RUST_LOG=ptth_quic=debug` for the terminal that
|
2021-09-10 19:16:38 +00:00
|
|
|
will run the end server (P4)
|
2022-10-09 14:19:01 +00:00
|
|
|
- Use `export RUST_LOG=ptth_quic_client=debug` for the terminal that
|
2021-09-10 19:16:38 +00:00
|
|
|
will run the client (P2)
|
2021-09-10 17:42:46 +00:00
|
|
|
|
|
|
|
When the relay server is running, use curl to get the list of connected
|
|
|
|
end servers: `curl 127.0.0.1:4004`
|
|
|
|
|
|
|
|
## Test loop - Happy path
|
|
|
|
|
2022-10-09 14:19:01 +00:00
|
|
|
- Start a relay `cargo run --bin ptth_quic_relay_server`
|
2021-09-10 17:42:46 +00:00
|
|
|
- Verify that the relay has no end servers connected
|
2022-10-09 14:19:01 +00:00
|
|
|
- Start an end server `cargo run --bin ptth_quic_end_server -- --debug-echo`
|
2021-09-10 17:42:46 +00:00
|
|
|
- Verify that the end server connected
|
2022-10-09 14:19:01 +00:00
|
|
|
- Start a client `cargo run --bin ptth_quic_client`
|
2021-09-10 19:16:38 +00:00
|
|
|
- Connect to the client and verify that the debug echo server is running
|
|
|
|
`nc 127.0.0.1 30381`
|