mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
ugly hack
This commit is contained in:
parent
2d25aa9c92
commit
2218f998c0
1 changed files with 28 additions and 12 deletions
|
@ -185,18 +185,34 @@ enum EpoxyCompression {
|
||||||
Gzip,
|
Gzip,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[wasm_bindgen]
|
|
||||||
pub struct EpoxyClientOptions {
|
// ugly hack. switch to serde-wasm-bindgen or a knockoff
|
||||||
pub wisp_v2: bool,
|
cfg_if! {
|
||||||
pub udp_extension_required: bool,
|
if #[cfg(feature = "full")] {
|
||||||
#[wasm_bindgen(getter_with_clone)]
|
#[wasm_bindgen]
|
||||||
pub websocket_protocols: Vec<String>,
|
pub struct EpoxyClientOptions {
|
||||||
pub redirect_limit: usize,
|
pub wisp_v2: bool,
|
||||||
#[wasm_bindgen(getter_with_clone)]
|
pub udp_extension_required: bool,
|
||||||
pub user_agent: String,
|
#[wasm_bindgen(getter_with_clone)]
|
||||||
#[cfg(feature = "full")]
|
pub websocket_protocols: Vec<String>,
|
||||||
#[wasm_bindgen(getter_with_clone)]
|
pub redirect_limit: usize,
|
||||||
pub pem_files: Vec<String>,
|
#[wasm_bindgen(getter_with_clone)]
|
||||||
|
pub user_agent: String,
|
||||||
|
#[wasm_bindgen(getter_with_clone)]
|
||||||
|
pub pem_files: Vec<String>,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
#[wasm_bindgen]
|
||||||
|
pub struct EpoxyClientOptions {
|
||||||
|
pub wisp_v2: bool,
|
||||||
|
pub udp_extension_required: bool,
|
||||||
|
#[wasm_bindgen(getter_with_clone)]
|
||||||
|
pub websocket_protocols: Vec<String>,
|
||||||
|
pub redirect_limit: usize,
|
||||||
|
#[wasm_bindgen(getter_with_clone)]
|
||||||
|
pub user_agent: String,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue