mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-24 00:01:11 +01:00
update deps
This commit is contained in:
parent
ff6ac0a67f
commit
84bd257b86
@ -1,5 +1,12 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.1.2] - 2019-01-xx
|
||||||
|
|
||||||
|
* Upgrade trust-dns-resolver
|
||||||
|
|
||||||
|
* Use tokio-current-thread instead of diract actix-rt dipendency
|
||||||
|
|
||||||
|
|
||||||
## [0.1.1] - 2019-01-13
|
## [0.1.1] - 2019-01-13
|
||||||
|
|
||||||
* Upgrade trust-dns-proto
|
* Upgrade trust-dns-proto
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-connector"
|
name = "actix-connector"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix Connector - tcp connector service"
|
description = "Actix Connector - tcp connector service"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
@ -27,13 +27,12 @@ default = []
|
|||||||
ssl = ["openssl", "tokio-openssl"]
|
ssl = ["openssl", "tokio-openssl"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-service = "0.1.1"
|
actix-service = "0.1.6"
|
||||||
actix-codec = "0.1.0"
|
actix-codec = "0.1.0"
|
||||||
actix-rt = "0.1.0"
|
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
tokio-tcp = "0.1"
|
tokio-tcp = "0.1"
|
||||||
trust-dns-proto = "0.6.2"
|
tokio-current-thread = "0.1"
|
||||||
trust-dns-resolver = "0.10.2"
|
trust-dns-resolver = { version="0.11.0-alpha.1", default-features = false }
|
||||||
|
|
||||||
# openssl
|
# openssl
|
||||||
openssl = { version="0.10", optional = true }
|
openssl = { version="0.10", optional = true }
|
||||||
|
@ -42,7 +42,7 @@ impl<T: RequestHost> Resolver<T> {
|
|||||||
/// Create new resolver instance with custom configuration and options.
|
/// Create new resolver instance with custom configuration and options.
|
||||||
pub fn new(cfg: ResolverConfig, opts: ResolverOpts) -> Self {
|
pub fn new(cfg: ResolverConfig, opts: ResolverOpts) -> Self {
|
||||||
let (resolver, bg) = AsyncResolver::new(cfg, opts);
|
let (resolver, bg) = AsyncResolver::new(cfg, opts);
|
||||||
actix_rt::Arbiter::spawn(bg);
|
tokio_current_thread::spawn(bg);
|
||||||
Resolver {
|
Resolver {
|
||||||
resolver,
|
resolver,
|
||||||
req: PhantomData,
|
req: PhantomData,
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.1.4] - 2018-12-xx
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
* Updated rustls dependency
|
||||||
|
|
||||||
|
|
||||||
## [0.1.3] - 2018-12-21
|
## [0.1.3] - 2018-12-21
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-server"
|
name = "actix-server"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix server - General purpose tcp server"
|
description = "Actix server - General purpose tcp server"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
@ -47,7 +47,7 @@ futures = "0.1"
|
|||||||
slab = "0.4"
|
slab = "0.4"
|
||||||
tokio-io = "0.1"
|
tokio-io = "0.1"
|
||||||
tokio-tcp = "0.1"
|
tokio-tcp = "0.1"
|
||||||
tokio-timer = "0.2"
|
tokio-timer = "0.2.8"
|
||||||
tokio-reactor = "0.1"
|
tokio-reactor = "0.1"
|
||||||
tokio-signal = "0.2"
|
tokio-signal = "0.2"
|
||||||
|
|
||||||
@ -59,13 +59,11 @@ openssl = { version="0.10", optional = true }
|
|||||||
tokio-openssl = { version="0.3", optional = true }
|
tokio-openssl = { version="0.3", optional = true }
|
||||||
|
|
||||||
#rustls
|
#rustls
|
||||||
rustls = { version = "^0.14", optional = true }
|
rustls = { version = "^0.15", optional = true }
|
||||||
tokio-rustls = { version = "^0.8", optional = true }
|
tokio-rustls = { version = "^0.9", optional = true }
|
||||||
webpki = { version = "0.18", optional = true }
|
webpki = { version = "0.19", optional = true }
|
||||||
webpki-roots = { version = "0.15", optional = true }
|
webpki-roots = { version = "0.16", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
env_logger = "0.5"
|
env_logger = "0.6"
|
||||||
actix-service = "0.1.1"
|
|
||||||
actix-codec = "0.1.0"
|
actix-codec = "0.1.0"
|
||||||
actix-rt = "0.1.0"
|
|
||||||
|
@ -51,7 +51,7 @@ native-tls = { version="0.2", optional = true }
|
|||||||
openssl = { version="0.10", optional = true }
|
openssl = { version="0.10", optional = true }
|
||||||
|
|
||||||
#rustls
|
#rustls
|
||||||
rustls = { version = "^0.14", optional = true }
|
rustls = { version = "^0.15", optional = true }
|
||||||
tokio-rustls = { version = "^0.8", optional = true }
|
tokio-rustls = { version = "^0.9", optional = true }
|
||||||
webpki = { version = "0.18", optional = true }
|
webpki = { version = "0.19", optional = true }
|
||||||
webpki-roots = { version = "0.15", optional = true }
|
webpki-roots = { version = "0.16", optional = true }
|
||||||
|
@ -18,10 +18,10 @@ name = "actix_utils"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-service = "0.1.2"
|
actix-service = "0.1.6"
|
||||||
actix-codec = "0.1.0"
|
actix-codec = "0.1.0"
|
||||||
actix-rt = "0.1.0"
|
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
tokio-timer = "0.2.8"
|
tokio-timer = "0.2.8"
|
||||||
|
tokio-current-thread = "0.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
@ -1,17 +1,11 @@
|
|||||||
//! Custom cell impl
|
//! Custom cell impl
|
||||||
|
|
||||||
#[cfg(feature = "cell")]
|
|
||||||
use std::cell::UnsafeCell;
|
use std::cell::UnsafeCell;
|
||||||
#[cfg(not(feature = "cell"))]
|
|
||||||
use std::cell::{Ref, RefCell, RefMut};
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
pub(crate) struct Cell<T> {
|
pub(crate) struct Cell<T> {
|
||||||
#[cfg(feature = "cell")]
|
|
||||||
inner: Rc<UnsafeCell<T>>,
|
inner: Rc<UnsafeCell<T>>,
|
||||||
#[cfg(not(feature = "cell"))]
|
|
||||||
inner: Rc<RefCell<T>>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Clone for Cell<T> {
|
impl<T> Clone for Cell<T> {
|
||||||
@ -28,7 +22,6 @@ impl<T: fmt::Debug> fmt::Debug for Cell<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "cell")]
|
|
||||||
impl<T> Cell<T> {
|
impl<T> Cell<T> {
|
||||||
pub fn new(inner: T) -> Self {
|
pub fn new(inner: T) -> Self {
|
||||||
Self {
|
Self {
|
||||||
@ -36,28 +29,11 @@ impl<T> Cell<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn borrow(&self) -> &T {
|
pub fn get_ref(&self) -> &T {
|
||||||
unsafe { &*self.inner.as_ref().get() }
|
unsafe { &*self.inner.as_ref().get() }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn borrow_mut(&self) -> &mut T {
|
pub fn get_mut(&mut self) -> &mut T {
|
||||||
unsafe { &mut *self.inner.as_ref().get() }
|
unsafe { &mut *self.inner.as_ref().get() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "cell"))]
|
|
||||||
impl<T> Cell<T> {
|
|
||||||
pub fn new(inner: T) -> Self {
|
|
||||||
Self {
|
|
||||||
inner: Rc::new(RefCell::new(inner)),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn borrow(&self) -> Ref<T> {
|
|
||||||
self.inner.borrow()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn borrow_mut(&self) -> RefMut<T> {
|
|
||||||
self.inner.borrow_mut()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -42,10 +42,10 @@ where
|
|||||||
type Future = T::Future;
|
type Future = T::Future;
|
||||||
|
|
||||||
fn poll_ready(&mut self) -> Poll<(), Self::Error> {
|
fn poll_ready(&mut self) -> Poll<(), Self::Error> {
|
||||||
self.service.borrow_mut().poll_ready()
|
self.service.get_mut().poll_ready()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn call(&mut self, req: Request) -> Self::Future {
|
fn call(&mut self, req: Request) -> Self::Future {
|
||||||
self.service.borrow_mut().call(req)
|
self.service.get_mut().call(req)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ use std::marker::PhantomData;
|
|||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
use actix_codec::{AsyncRead, AsyncWrite, Decoder, Encoder, Framed};
|
use actix_codec::{AsyncRead, AsyncWrite, Decoder, Encoder, Framed};
|
||||||
use actix_rt::Arbiter;
|
|
||||||
use actix_service::{IntoNewService, IntoService, NewService, Service};
|
use actix_service::{IntoNewService, IntoService, NewService, Service};
|
||||||
use futures::future::{ok, FutureResult};
|
use futures::future::{ok, FutureResult};
|
||||||
use futures::unsync::mpsc;
|
use futures::unsync::mpsc;
|
||||||
@ -251,7 +250,7 @@ where
|
|||||||
Ok(Async::Ready(_)) => {
|
Ok(Async::Ready(_)) => {
|
||||||
if let Some(item) = self.request.take() {
|
if let Some(item) = self.request.take() {
|
||||||
let sender = self.write_tx.clone();
|
let sender = self.write_tx.clone();
|
||||||
Arbiter::spawn(
|
tokio_current_thread::spawn(
|
||||||
self.service
|
self.service
|
||||||
.call(item)
|
.call(item)
|
||||||
.then(|item| sender.send(item).map(|_| ()).map_err(|_| ())),
|
.then(|item| sender.send(item).map(|_| ()).map_err(|_| ())),
|
||||||
@ -276,7 +275,7 @@ where
|
|||||||
match self.service.poll_ready() {
|
match self.service.poll_ready() {
|
||||||
Ok(Async::Ready(_)) => {
|
Ok(Async::Ready(_)) => {
|
||||||
let sender = self.write_tx.clone();
|
let sender = self.write_tx.clone();
|
||||||
Arbiter::spawn(
|
tokio_current_thread::spawn(
|
||||||
self.service
|
self.service
|
||||||
.call(item)
|
.call(item)
|
||||||
.then(|item| sender.send(item).map(|_| ()).map_err(|_| ())),
|
.then(|item| sender.send(item).map(|_| ()).map_err(|_| ())),
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
use actix_rt::spawn;
|
|
||||||
use actix_service::{IntoNewService, IntoService, NewService, Service};
|
use actix_service::{IntoNewService, IntoService, NewService, Service};
|
||||||
use futures::future::{ok, Future, FutureResult};
|
use futures::future::{ok, Future, FutureResult};
|
||||||
use futures::unsync::mpsc;
|
use futures::unsync::mpsc;
|
||||||
@ -162,11 +161,13 @@ where
|
|||||||
loop {
|
loop {
|
||||||
match self.service.poll_ready()? {
|
match self.service.poll_ready()? {
|
||||||
Async::Ready(_) => match self.stream.poll() {
|
Async::Ready(_) => match self.stream.poll() {
|
||||||
Ok(Async::Ready(Some(item))) => spawn(StreamDispatcherService {
|
Ok(Async::Ready(Some(item))) => {
|
||||||
fut: self.service.call(Ok(item)),
|
tokio_current_thread::spawn(StreamDispatcherService {
|
||||||
stop: self.err_tx.clone(),
|
fut: self.service.call(Ok(item)),
|
||||||
}),
|
stop: self.err_tx.clone(),
|
||||||
Err(err) => spawn(StreamDispatcherService {
|
})
|
||||||
|
}
|
||||||
|
Err(err) => tokio_current_thread::spawn(StreamDispatcherService {
|
||||||
fut: self.service.call(Err(err)),
|
fut: self.service.call(Err(err)),
|
||||||
stop: self.err_tx.clone(),
|
stop: self.err_tx.clone(),
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user