使用读写锁简化操作,增加延迟优先选项

This commit is contained in:
lubeilin
2023-10-31 20:48:38 +08:00
parent d2e09d3da5
commit b0c3f25a29
10 changed files with 96 additions and 269 deletions
+2
View File
@@ -66,6 +66,7 @@ fn new_sync(env: &mut JNIEnv, config: JObject) -> Result<VntUtilSync, Error> {
let cipher_model = to_string_not_null(env, &config, "cipherModel")?;
let tcp = env.get_field(&config, "tcp", "Z")?.z()?;
let finger = env.get_field(&config, "finger", "Z")?.z()?;
let first_latency = env.get_field(&config, "firstLatency", "Z")?.z()?;
let in_ips = to_string(env, &config, "inIps")?;
let out_ips = to_string(env, &config, "outIps")?;
let port = env.get_field(&config, "port", "I")?.i()? as u16;
@@ -152,6 +153,7 @@ fn new_sync(env: &mut JNIEnv, config: JObject) -> Result<VntUtilSync, Error> {
finger,
PunchModel::All,
port,
first_latency,
);
match VntUtilSync::new(config) {
Ok(vnt_util) => Ok(vnt_util),