mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-27 19:12:56 +01:00
use direct tokio exports where possible
This commit is contained in:
parent
428914e65e
commit
00654aadc5
@ -1,8 +1,7 @@
|
|||||||
//! Codec utilities for working with framed protocols.
|
//! Codec utilities for working with framed protocols.
|
||||||
//!
|
//!
|
||||||
//! Contains adapters to go from streams of bytes, [`AsyncRead`] and
|
//! Contains adapters to go from streams of bytes, [`AsyncRead`] and [`AsyncWrite`], to framed
|
||||||
//! [`AsyncWrite`], to framed streams implementing [`Sink`] and [`Stream`].
|
//! streams implementing [`Sink`] and [`Stream`]. Framed streams are also known as `transports`.
|
||||||
//! Framed streams are also known as `transports`.
|
|
||||||
//!
|
//!
|
||||||
//! [`Sink`]: futures_sink::Sink
|
//! [`Sink`]: futures_sink::Sink
|
||||||
//! [`Stream`]: futures_core::Stream
|
//! [`Stream`]: futures_core::Stream
|
||||||
|
@ -40,8 +40,8 @@ tracing = { version = "0.1.30", default-features = false, features = ["log"] }
|
|||||||
tokio-uring = { version = "0.3", optional = true }
|
tokio-uring = { version = "0.3", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-codec = "0.5.0"
|
actix-codec = "0.5"
|
||||||
actix-rt = "2.6.0"
|
actix-rt = "2.6"
|
||||||
|
|
||||||
bytes = "1"
|
bytes = "1"
|
||||||
env_logger = "0.9"
|
env_logger = "0.9"
|
||||||
|
@ -30,19 +30,18 @@ accept = []
|
|||||||
connect = []
|
connect = []
|
||||||
|
|
||||||
# use openssl impls
|
# use openssl impls
|
||||||
openssl = ["tls-openssl", "tokio-openssl", "actix-codec"]
|
openssl = ["tls-openssl", "tokio-openssl"]
|
||||||
|
|
||||||
# use rustls impls
|
# use rustls impls
|
||||||
rustls = ["tokio-rustls", "webpki-roots", "actix-codec"]
|
rustls = ["tokio-rustls", "webpki-roots"]
|
||||||
|
|
||||||
# use native-tls impls
|
# use native-tls impls
|
||||||
native-tls = ["tokio-native-tls", "actix-codec"]
|
native-tls = ["tokio-native-tls"]
|
||||||
|
|
||||||
# support http::Uri as connect address
|
# support http::Uri as connect address
|
||||||
uri = ["http"]
|
uri = ["http"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-codec = { version = "0.5.0", optional = true }
|
|
||||||
actix-rt = { version = "2.2.0", default-features = false }
|
actix-rt = { version = "2.2.0", default-features = false }
|
||||||
actix-service = "2"
|
actix-service = "2"
|
||||||
actix-utils = "3"
|
actix-utils = "3"
|
||||||
@ -50,6 +49,7 @@ actix-utils = "3"
|
|||||||
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
||||||
impl-more = "0.1"
|
impl-more = "0.1"
|
||||||
pin-project-lite = "0.2.7"
|
pin-project-lite = "0.2.7"
|
||||||
|
tokio = "1.13.1"
|
||||||
tokio-util = "0.7"
|
tokio-util = "0.7"
|
||||||
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
|
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
|
||||||
|
|
||||||
@ -68,8 +68,8 @@ webpki-roots = { version = "0.22", optional = true }
|
|||||||
tokio-native-tls = { version = "0.3", optional = true }
|
tokio-native-tls = { version = "0.3", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-codec = "0.5.0"
|
actix-codec = "0.5"
|
||||||
actix-rt = "2.2.0"
|
actix-rt = "2.2"
|
||||||
actix-server = "2"
|
actix-server = "2"
|
||||||
bytes = "1"
|
bytes = "1"
|
||||||
env_logger = "0.9"
|
env_logger = "0.9"
|
||||||
|
@ -10,7 +10,6 @@ use std::{
|
|||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
|
|
||||||
use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
|
|
||||||
use actix_rt::{
|
use actix_rt::{
|
||||||
net::{ActixStream, Ready},
|
net::{ActixStream, Ready},
|
||||||
time::timeout,
|
time::timeout,
|
||||||
@ -21,6 +20,7 @@ use actix_utils::{
|
|||||||
future::{ready, Ready as FutReady},
|
future::{ready, Ready as FutReady},
|
||||||
};
|
};
|
||||||
use futures_core::future::LocalBoxFuture;
|
use futures_core::future::LocalBoxFuture;
|
||||||
|
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||||
use tokio_native_tls::{native_tls::Error, TlsAcceptor};
|
use tokio_native_tls::{native_tls::Error, TlsAcceptor};
|
||||||
|
|
||||||
use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
|
use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
|
||||||
|
@ -11,7 +11,6 @@ use std::{
|
|||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
|
|
||||||
use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
|
|
||||||
use actix_rt::{
|
use actix_rt::{
|
||||||
net::{ActixStream, Ready},
|
net::{ActixStream, Ready},
|
||||||
time::{sleep, Sleep},
|
time::{sleep, Sleep},
|
||||||
@ -23,6 +22,7 @@ use actix_utils::{
|
|||||||
};
|
};
|
||||||
use openssl::ssl::{Error, Ssl, SslAcceptor};
|
use openssl::ssl::{Error, Ssl, SslAcceptor};
|
||||||
use pin_project_lite::pin_project;
|
use pin_project_lite::pin_project;
|
||||||
|
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||||
|
|
||||||
use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
|
use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ use std::{
|
|||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
|
|
||||||
use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
|
|
||||||
use actix_rt::{
|
use actix_rt::{
|
||||||
net::{ActixStream, Ready},
|
net::{ActixStream, Ready},
|
||||||
time::{sleep, Sleep},
|
time::{sleep, Sleep},
|
||||||
@ -23,6 +22,7 @@ use actix_utils::{
|
|||||||
future::{ready, Ready as FutReady},
|
future::{ready, Ready as FutReady},
|
||||||
};
|
};
|
||||||
use pin_project_lite::pin_project;
|
use pin_project_lite::pin_project;
|
||||||
|
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||||
use tokio_rustls::rustls::ServerConfig;
|
use tokio_rustls::rustls::ServerConfig;
|
||||||
use tokio_rustls::{Accept, TlsAcceptor};
|
use tokio_rustls::{Accept, TlsAcceptor};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user