Skip to content

Commit

Permalink
Updated server preferred address API, implemented quiche-client app s…
Browse files Browse the repository at this point in the history
…upport for preferred address, implemented quiche-server app support for preferred address
  • Loading branch information
Clendenin committed Apr 12, 2024
1 parent e32f658 commit c209958
Show file tree
Hide file tree
Showing 6 changed files with 608 additions and 357 deletions.
1 change: 1 addition & 0 deletions apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ring = "0.17"
quiche = { path = "../quiche" }
libc = "0.2"
nix = { version = "0.27", features = ["net", "socket", "uio"] }
smallvec = { version = "1.10" }

[lib]
crate-type = ["lib"]
4 changes: 4 additions & 0 deletions apps/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ pub const SERVER_USAGE: &str = "Usage:
Options:
--listen <addr> Listen on the given IP:port [default: 127.0.0.1:4433]
--preferred-address <addr> Preferred IP:port for server migration [default: 127.0.0.1:4434]
--cert <file> TLS certificate path [default: src/bin/cert.crt]
--key <file> TLS certificate key path [default: src/bin/cert.key]
--root <dir> Root directory [default: src/bin/root/]
Expand Down Expand Up @@ -470,6 +471,7 @@ Options:
// Application-specific arguments that compliment the `CommonArgs`.
pub struct ServerArgs {
pub listen: String,
pub preferred_address: String,
pub no_retry: bool,
pub root: String,
pub index: String,
Expand All @@ -485,6 +487,7 @@ impl Args for ServerArgs {
let args = docopt.parse().unwrap_or_else(|e| e.exit());

let listen = args.get_str("--listen").to_string();
let preferred_address = args.get_str("--preferred-address").to_string();
let no_retry = args.get_bool("--no-retry");
let root = args.get_str("--root").to_string();
let index = args.get_str("--index").to_string();
Expand All @@ -496,6 +499,7 @@ impl Args for ServerArgs {

ServerArgs {
listen,
preferred_address,
no_retry,
root,
index,
Expand Down
Loading

0 comments on commit c209958

Please sign in to comment.