1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-26 19:47:43 +02:00

refactor server configuration and tls support

This commit is contained in:
Nikolay Kim
2019-12-02 11:30:27 +06:00
parent 16ff283fb2
commit 9fbe6a1f6d
21 changed files with 366 additions and 526 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "actix-rt"
version = "1.0.0-alpha.1"
version = "1.0.0-alpha.2"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix runtime"
keywords = ["network", "framework", "async", "futures"]
@ -21,10 +21,9 @@ path = "src/lib.rs"
actix-macros = "0.1.0-alpha.1"
actix-threadpool = "0.2"
futures = "0.3.1"
copyless = "0.1.4"
tokio = { version = "=0.2.0-alpha.6", features=["rt-current-thread","tcp","uds","udp","timer"] }
tokio = { version = "=0.2.0-alpha.6", features=["rt-current-thread","tcp","uds","udp","timer","signal"] }
tokio-executor = "=0.2.0-alpha.6"
tokio-net = "=0.2.0-alpha.6"
tokio-timer = "=0.3.0-alpha.6"
copyless = "0.1.4"
tokio-timer = "=0.3.0-alpha.6"

View File

@ -32,6 +32,28 @@ where
Arbiter::spawn(f);
}
/// Asynchronous signal handling
pub mod signal {
#[cfg(unix)]
pub mod unix {
pub use tokio_net::signal::unix::*;
}
pub use tokio_net::signal::{ctrl_c, CtrlC};
}
/// TCP/UDP/Unix bindings
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::*;
}
/// Utilities for tracking time.
pub mod time {
use std::time::{Duration, Instant};
@ -52,15 +74,3 @@ 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::*;
}