remove experimental features

This commit is contained in:
zephyr
2022-06-17 00:38:41 +09:00
parent 11f61f36bf
commit 2dafcc3e1a
8 changed files with 0 additions and 88 deletions
-8
View File
@@ -1,8 +0,0 @@
[package]
name = "realm_agent"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-8
View File
@@ -1,8 +0,0 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}
-8
View File
@@ -1,8 +0,0 @@
[package]
name = "realm_ctrl"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-8
View File
@@ -1,8 +0,0 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}
-2
View File
@@ -1,2 +0,0 @@
[build]
rustflags = ["--cfg", "tokio_unstable"]
-8
View File
@@ -1,8 +0,0 @@
[package]
name = "realm_x"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-8
View File
@@ -1,8 +0,0 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}
-38
View File
@@ -55,41 +55,3 @@ pub async fn run_tcp(endpoint: Endpoint) -> Result<()> {
});
}
}
/// Launch a tcp relay, where tasks are not detached.
#[cfg(feature = "x")]
pub async fn run_tcp_scoped(endpoint: Endpoint) -> Result<()> {
use tokio::task::JoinSet;
let Endpoint {
laddr,
raddr,
conn_opts,
} = endpoint;
let raddr = Ref::new(&raddr);
let conn_opts = Ref::new(&conn_opts);
let lis = socket::bind(&laddr).unwrap_or_else(|e| panic!("[tcp]failed to bind {}: {}", &laddr, e));
let mut tasks = JoinSet::new();
loop {
let (local, addr) = match lis.accept().await {
Ok(x) => x,
Err(e) => {
log::error!("[tcp]failed to accept: {}", e);
continue;
}
};
// ignore error
let _ = local.set_nodelay(true);
tasks.spawn(async move {
match connect_and_relay(local, raddr, conn_opts).await {
Ok(..) => log::debug!("[tcp]{} => {}, finish", addr, raddr.as_ref()),
Err(e) => log::error!("[tcp]{} => {}, error: {}", addr, raddr.as_ref(), e),
}
});
}
}