1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-27 18:49:01 +02:00

Unix domain sockets (HttpServer::bind_uds) #92

This commit is contained in:
Nikolay Kim
2019-07-18 17:24:12 +06:00
parent d03296237e
commit fbdda8acb1
9 changed files with 108 additions and 10 deletions

View File

@ -12,6 +12,7 @@ use futures::future::lazy;
use futures::{Future, IntoFuture, Stream};
use http::Method;
use net2::TcpBuilder;
use tokio_tcp::TcpStream;
thread_local! {
static RT: RefCell<Inner> = {
@ -109,7 +110,7 @@ pub struct TestServerRuntime {
impl TestServer {
#[allow(clippy::new_ret_no_self)]
/// Start new test server with application factory
pub fn new<F: StreamServiceFactory>(factory: F) -> TestServerRuntime {
pub fn new<F: StreamServiceFactory<TcpStream>>(factory: F) -> TestServerRuntime {
let (tx, rx) = mpsc::channel();
// run server in separate thread