mirror of
https://github.com/fafhrd91/actix-net
synced 2025-08-29 20:59:19 +02:00
Compare commits
4 Commits
service-v2
...
server-v2.
Author | SHA1 | Date | |
---|---|---|---|
|
16ba77c4c8 | ||
|
b4a3f51659 | ||
|
9d0901e07f | ||
|
ebb9cd055f |
@@ -3,6 +3,12 @@
|
|||||||
## Unreleased - 2021-xx-xx
|
## Unreleased - 2021-xx-xx
|
||||||
|
|
||||||
|
|
||||||
|
## 2.0.1 - 2021-02-06
|
||||||
|
* Expose `JoinError` from Tokio. [#271]
|
||||||
|
|
||||||
|
[#271]: https://github.com/actix/actix-net/pull/271
|
||||||
|
|
||||||
|
|
||||||
## 2.0.0 - 2021-02-02
|
## 2.0.0 - 2021-02-02
|
||||||
* Remove all Arbiter-local storage methods. [#262]
|
* Remove all Arbiter-local storage methods. [#262]
|
||||||
* Re-export `tokio::pin`. [#262]
|
* Re-export `tokio::pin`. [#262]
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-rt"
|
name = "actix-rt"
|
||||||
version = "2.0.0"
|
version = "2.0.1"
|
||||||
authors = [
|
authors = [
|
||||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||||
"Rob Ede <robjtede@icloud.com>",
|
"Rob Ede <robjtede@icloud.com>",
|
||||||
@@ -26,8 +26,8 @@ macros = ["actix-macros"]
|
|||||||
actix-macros = { version = "0.2.0", optional = true }
|
actix-macros = { version = "0.2.0", optional = true }
|
||||||
|
|
||||||
futures-core = { version = "0.3", default-features = false }
|
futures-core = { version = "0.3", default-features = false }
|
||||||
tokio = { version = "1", features = ["rt", "net", "parking_lot", "signal", "sync", "time"] }
|
tokio = { version = "1.2", features = ["rt", "net", "parking_lot", "signal", "sync", "time"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1.2", features = ["full"] }
|
||||||
hyper = { version = "0.14", default-features = false, features = ["server", "tcp", "http1"] }
|
hyper = { version = "0.14", default-features = false, features = ["server", "tcp", "http1"] }
|
||||||
|
@@ -91,7 +91,7 @@ pub mod time {
|
|||||||
pub mod task {
|
pub mod task {
|
||||||
//! Task management (Tokio re-exports).
|
//! Task management (Tokio re-exports).
|
||||||
|
|
||||||
pub use tokio::task::{spawn_blocking, yield_now, JoinHandle};
|
pub use tokio::task::{spawn_blocking, yield_now, JoinError, JoinHandle};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Spawns a future on the current thread.
|
/// Spawns a future on the current thread.
|
||||||
|
@@ -1,13 +1,18 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## Unreleased - 2021-xx-xx
|
## Unreleased - 2021-xx-xx
|
||||||
|
|
||||||
|
|
||||||
|
## 2.0.0-beta.3 - 2021-02-06
|
||||||
* Hidden `ServerBuilder::start` method has been removed. Use `ServerBuilder::run`. [#246]
|
* Hidden `ServerBuilder::start` method has been removed. Use `ServerBuilder::run`. [#246]
|
||||||
* Add retry for EINTR(`io::Interrupted`) in `Accept`'s poll loop. [#264]
|
* Add retry for EINTR signal (`io::Interrupted`) in `Accept`'s poll loop. [#264]
|
||||||
* Add `ServerBuilder::worker_max_blocking_threads` for customize blocking thread pool. [#265]
|
* Add `ServerBuilder::worker_max_blocking_threads` to customize blocking thread pool size. [#265]
|
||||||
|
* Update `actix-rt` to `2.0.0`. [#273]
|
||||||
|
|
||||||
[#246]: https://github.com/actix/actix-net/pull/246
|
[#246]: https://github.com/actix/actix-net/pull/246
|
||||||
[#264]: https://github.com/actix/actix-net/pull/264
|
[#264]: https://github.com/actix/actix-net/pull/264
|
||||||
[#265]: https://github.com/actix/actix-net/pull/265
|
[#265]: https://github.com/actix/actix-net/pull/265
|
||||||
|
[#273]: https://github.com/actix/actix-net/pull/273
|
||||||
|
|
||||||
|
|
||||||
## 2.0.0-beta.2 - 2021-01-03
|
## 2.0.0-beta.2 - 2021-01-03
|
||||||
|
@@ -26,7 +26,7 @@ default = []
|
|||||||
actix-codec = "0.4.0-beta.1"
|
actix-codec = "0.4.0-beta.1"
|
||||||
actix-rt = { version = "2.0.0", default-features = false }
|
actix-rt = { version = "2.0.0", default-features = false }
|
||||||
actix-service = "2.0.0-beta.4"
|
actix-service = "2.0.0-beta.4"
|
||||||
actix-utils = "3.0.0-beta.1"
|
actix-utils = "3.0.0-beta.2"
|
||||||
|
|
||||||
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
@@ -2,8 +2,6 @@ use std::future::Future;
|
|||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::task::{Context, Poll};
|
use std::task::{Context, Poll};
|
||||||
|
|
||||||
use futures_core::future::LocalBoxFuture;
|
|
||||||
|
|
||||||
use crate::server::Server;
|
use crate::server::Server;
|
||||||
|
|
||||||
/// Different types of process signals
|
/// Different types of process signals
|
||||||
@@ -23,9 +21,9 @@ pub(crate) enum Signal {
|
|||||||
pub(crate) struct Signals {
|
pub(crate) struct Signals {
|
||||||
srv: Server,
|
srv: Server,
|
||||||
#[cfg(not(unix))]
|
#[cfg(not(unix))]
|
||||||
signals: LocalBoxFuture<'static, std::io::Result<()>>,
|
signals: futures_core::future::LocalBoxFuture<'static, std::io::Result<()>>,
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
signals: Vec<(Signal, LocalBoxFuture<'static, ()>)>,
|
signals: Vec<(Signal, actix_rt::signal::unix::Signal)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Signals {
|
impl Signals {
|
||||||
@@ -48,23 +46,21 @@ impl Signals {
|
|||||||
(unix::SignalKind::quit(), Signal::Quit),
|
(unix::SignalKind::quit(), Signal::Quit),
|
||||||
];
|
];
|
||||||
|
|
||||||
let mut signals = Vec::new();
|
let signals = sig_map
|
||||||
|
.iter()
|
||||||
for (kind, sig) in sig_map.iter() {
|
.filter_map(|(kind, sig)| {
|
||||||
match unix::signal(*kind) {
|
unix::signal(*kind)
|
||||||
Ok(mut stream) => {
|
.map(|tokio_sig| (*sig, tokio_sig))
|
||||||
let fut = Box::pin(async move {
|
.map_err(|e| {
|
||||||
let _ = stream.recv().await;
|
log::error!(
|
||||||
}) as _;
|
"Can not initialize stream handler for {:?} err: {}",
|
||||||
signals.push((*sig, fut));
|
sig,
|
||||||
}
|
e
|
||||||
Err(e) => log::error!(
|
)
|
||||||
"Can not initialize stream handler for {:?} err: {}",
|
})
|
||||||
sig,
|
.ok()
|
||||||
e
|
})
|
||||||
),
|
.collect::<Vec<_>>();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
actix_rt::spawn(Signals { srv, signals });
|
actix_rt::spawn(Signals { srv, signals });
|
||||||
}
|
}
|
||||||
@@ -86,7 +82,7 @@ impl Future for Signals {
|
|||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
{
|
{
|
||||||
for (sig, fut) in self.signals.iter_mut() {
|
for (sig, fut) in self.signals.iter_mut() {
|
||||||
if fut.as_mut().poll(cx).is_ready() {
|
if Pin::new(fut).poll_recv(cx).is_ready() {
|
||||||
let sig = *sig;
|
let sig = *sig;
|
||||||
self.srv.signal(sig);
|
self.srv.signal(sig);
|
||||||
return Poll::Ready(());
|
return Poll::Ready(());
|
||||||
|
@@ -1,17 +1,22 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## Unreleased - 2021-xx-xx
|
## Unreleased - 2021-xx-xx
|
||||||
|
|
||||||
|
|
||||||
|
## 3.0.0-beta.3 - 2021-02-06
|
||||||
* Remove `trust-dns-proto` and `trust-dns-resolver`. [#248]
|
* Remove `trust-dns-proto` and `trust-dns-resolver`. [#248]
|
||||||
* Use `std::net::ToSocketAddrs` as simple and basic default resolver. [#248]
|
* Use `std::net::ToSocketAddrs` as simple and basic default resolver. [#248]
|
||||||
* Add `Resolve` trait for custom dns resolver. [#248]
|
* Add `Resolve` trait for custom DNS resolvers. [#248]
|
||||||
* Add `Resolver::new_custom` function to construct custom resolvers. [#248]
|
* Add `Resolver::new_custom` function to construct custom resolvers. [#248]
|
||||||
* Export `webpki_roots::TLS_SERVER_ROOTS` in `actix_tls::connect` mod and remove
|
* Export `webpki_roots::TLS_SERVER_ROOTS` in `actix_tls::connect` mod and remove
|
||||||
the export from `actix_tls::accept` [#248]
|
the export from `actix_tls::accept` [#248]
|
||||||
* Remove `ConnectTakeAddrsIter`. `Connect::take_addrs` now returns `ConnectAddrsIter<'static>`
|
* Remove `ConnectTakeAddrsIter`. `Connect::take_addrs` now returns `ConnectAddrsIter<'static>`
|
||||||
as owned iterator. [#248]
|
as owned iterator. [#248]
|
||||||
* Rename `Address::{host => hostname}` to more accurately describe which URL segment is returned.
|
* Rename `Address::{host => hostname}` to more accurately describe which URL segment is returned.
|
||||||
|
* Update `actix-rt` to `2.0.0`. [#273]
|
||||||
|
|
||||||
[#248]: https://github.com/actix/actix-net/pull/248
|
[#248]: https://github.com/actix/actix-net/pull/248
|
||||||
|
[#273]: https://github.com/actix/actix-net/pull/273
|
||||||
|
|
||||||
|
|
||||||
## 3.0.0-beta.2 - 2021-xx-xx
|
## 3.0.0-beta.2 - 2021-xx-xx
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-tls"
|
name = "actix-tls"
|
||||||
version = "3.0.0-beta.2"
|
version = "3.0.0-beta.3"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "TLS acceptor and connector services for Actix ecosystem"
|
description = "TLS acceptor and connector services for Actix ecosystem"
|
||||||
keywords = ["network", "tls", "ssl", "async", "transport"]
|
keywords = ["network", "tls", "ssl", "async", "transport"]
|
||||||
@@ -43,7 +43,7 @@ uri = ["http"]
|
|||||||
actix-codec = "0.4.0-beta.1"
|
actix-codec = "0.4.0-beta.1"
|
||||||
actix-rt = { version = "2.0.0", default-features = false }
|
actix-rt = { version = "2.0.0", default-features = false }
|
||||||
actix-service = "2.0.0-beta.4"
|
actix-service = "2.0.0-beta.4"
|
||||||
actix-utils = "3.0.0-beta.1"
|
actix-utils = "3.0.0-beta.2"
|
||||||
|
|
||||||
derive_more = "0.99.5"
|
derive_more = "0.99.5"
|
||||||
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
||||||
|
@@ -3,6 +3,12 @@
|
|||||||
## Unreleased - 2021-xx-xx
|
## Unreleased - 2021-xx-xx
|
||||||
|
|
||||||
|
|
||||||
|
## 3.0.0-beta.2 - 2021-02-06
|
||||||
|
* Update `actix-rt` to `2.0.0`. [#273]
|
||||||
|
|
||||||
|
[#273]: https://github.com/actix/actix-net/pull/273
|
||||||
|
|
||||||
|
|
||||||
## 3.0.0-beta.1 - 2020-12-28
|
## 3.0.0-beta.1 - 2020-12-28
|
||||||
* Update `bytes` dependency to `1`. [#237]
|
* Update `bytes` dependency to `1`. [#237]
|
||||||
* Use `pin-project-lite` to replace `pin-project`. [#229]
|
* Use `pin-project-lite` to replace `pin-project`. [#229]
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-utils"
|
name = "actix-utils"
|
||||||
version = "3.0.0-beta.1"
|
version = "3.0.0-beta.2"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Various network related services and utilities for the Actix ecosystem"
|
description = "Various network related services and utilities for the Actix ecosystem"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
@@ -26,4 +26,5 @@ log = "0.4"
|
|||||||
pin-project-lite = "0.2.0"
|
pin-project-lite = "0.2.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
actix-rt = "2.0.0"
|
||||||
futures-util = { version = "0.3.7", default-features = false }
|
futures-util = { version = "0.3.7", default-features = false }
|
||||||
|
@@ -24,4 +24,4 @@ serde = { version = "1.0", optional = true }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
ahash = { version = "0.6", default-features = false }
|
ahash = { version = "0.7", default-features = false }
|
||||||
|
Reference in New Issue
Block a user