mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-27 21:22:57 +01:00
fix examples
This commit is contained in:
parent
4adbbad450
commit
de66b5c776
10
Cargo.toml
10
Cargo.toml
@ -22,3 +22,13 @@ members = [
|
|||||||
"actix-rt",
|
"actix-rt",
|
||||||
"actix-utils",
|
"actix-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
actix-service = "0.1.1"
|
||||||
|
actix-codec = "0.1.0"
|
||||||
|
actix-rt = { path="actix-rt" }
|
||||||
|
actix-server = { path="actix-server", features=["ssl"] }
|
||||||
|
env_logger = "0.5"
|
||||||
|
futures = "0.1.24"
|
||||||
|
openssl = { version="0.10" }
|
||||||
|
tokio-openssl = { version="0.3" }
|
||||||
|
@ -29,7 +29,7 @@ ssl = ["openssl", "tokio-openssl"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-service = "0.1.1"
|
actix-service = "0.1.1"
|
||||||
actix-codec = { path = "../actix-codec" }
|
actix-codec = "0.1.0"
|
||||||
actix-rt = { path = "../actix-rt" }
|
actix-rt = { path = "../actix-rt" }
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
tokio-tcp = "0.1"
|
tokio-tcp = "0.1"
|
||||||
@ -40,8 +40,3 @@ trust-dns-resolver = "^0.10.0"
|
|||||||
# openssl
|
# openssl
|
||||||
openssl = { version="0.10", optional = true }
|
openssl = { version="0.10", optional = true }
|
||||||
tokio-openssl = { version="0.3", optional = true }
|
tokio-openssl = { version="0.3", optional = true }
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
opt-level = 3
|
|
||||||
codegen-units = 1
|
|
||||||
|
@ -67,8 +67,3 @@ webpki-roots = { version = "0.15", optional = true }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
env_logger = "0.5"
|
env_logger = "0.5"
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
opt-level = 3
|
|
||||||
codegen-units = 1
|
|
||||||
|
@ -20,15 +20,10 @@ path = "src/lib.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-service = "0.1.1"
|
actix-service = "0.1.1"
|
||||||
actix-codec = { path = "../actix-codec" }
|
actix-codec = "0.1.0"
|
||||||
actix-rt = { path = "../actix-rt" }
|
actix-rt = { path = "../actix-rt" }
|
||||||
|
|
||||||
# io
|
# io
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
tokio-timer = "0.2.8"
|
tokio-timer = "0.2.8"
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
opt-level = 3
|
|
||||||
codegen-units = 1
|
|
||||||
|
@ -7,15 +7,14 @@ use std::sync::{
|
|||||||
};
|
};
|
||||||
use std::{env, fmt};
|
use std::{env, fmt};
|
||||||
|
|
||||||
|
use actix_codec::{AsyncRead, AsyncWrite};
|
||||||
|
use actix_rt::System;
|
||||||
|
use actix_server::Server;
|
||||||
|
use actix_service::{IntoNewService, NewService};
|
||||||
use futures::{future, Future};
|
use futures::{future, Future};
|
||||||
use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};
|
use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};
|
||||||
use tokio_io::{AsyncRead, AsyncWrite};
|
|
||||||
use tokio_openssl::SslAcceptorExt;
|
use tokio_openssl::SslAcceptorExt;
|
||||||
|
|
||||||
use actix_net::server::Server;
|
|
||||||
use actix_rt::System;
|
|
||||||
use actix_service::{IntoNewService, NewService};
|
|
||||||
|
|
||||||
/// Simple logger service, it just prints fact of the new connections
|
/// Simple logger service, it just prints fact of the new connections
|
||||||
fn logger<T: AsyncRead + AsyncWrite + fmt::Debug>(
|
fn logger<T: AsyncRead + AsyncWrite + fmt::Debug>(
|
||||||
stream: T,
|
stream: T,
|
||||||
|
@ -3,14 +3,12 @@ use std::sync::{
|
|||||||
Arc,
|
Arc,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use actix_codec::{AsyncRead, AsyncWrite};
|
||||||
|
use actix_rt::System;
|
||||||
|
use actix_server::{ssl, Server};
|
||||||
|
use actix_service::NewService;
|
||||||
use futures::{future, Future};
|
use futures::{future, Future};
|
||||||
use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};
|
use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};
|
||||||
use tokio_io::{AsyncRead, AsyncWrite};
|
|
||||||
|
|
||||||
use actix_net::server::Server;
|
|
||||||
use actix_net::ssl;
|
|
||||||
use actix_rt::System;
|
|
||||||
use actix_service::NewService;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct ServiceState {
|
struct ServiceState {
|
||||||
|
Loading…
Reference in New Issue
Block a user