diff --git a/actix-rt/Cargo.toml b/actix-rt/Cargo.toml index 6638316a..6d141269 100644 --- a/actix-rt/Cargo.toml +++ b/actix-rt/Cargo.toml @@ -22,7 +22,7 @@ actix-macros = "0.1.0-alpha.1" actix-threadpool = "0.2" futures = "0.3.1" -tokio = "=0.2.0-alpha.6" +tokio = { version = "=0.2.0-alpha.6", features=["tcp","uds","udp"] } tokio-executor = "=0.2.0-alpha.6" tokio-net = "=0.2.0-alpha.6" tokio-timer = "=0.3.0-alpha.6" diff --git a/actix-rt/src/lib.rs b/actix-rt/src/lib.rs index c1faaca9..cf1c359c 100644 --- a/actix-rt/src/lib.rs +++ b/actix-rt/src/lib.rs @@ -52,3 +52,15 @@ pub mod time { Interval::new(start, duration) } } + +pub mod net { + pub use tokio::net::UdpSocket; + pub use tokio::net::{TcpListener, TcpStream}; + + #[cfg(unix)] + mod unix { + pub use tokio::net::{UnixDatagram, UnixListener, UnixStream}; + } + + pub use self::unix::*; +}