mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-30 17:44:34 +01:00
remove constraint
This commit is contained in:
parent
0fdac38307
commit
b6f952b036
@ -2,7 +2,6 @@ use std::time::Duration;
|
|||||||
use std::{io, mem, net};
|
use std::{io, mem, net};
|
||||||
|
|
||||||
use actix_rt::{spawn, Arbiter, System};
|
use actix_rt::{spawn, Arbiter, System};
|
||||||
use actix_service::NewService;
|
|
||||||
use futures::future::{lazy, ok};
|
use futures::future::{lazy, ok};
|
||||||
use futures::stream::futures_unordered;
|
use futures::stream::futures_unordered;
|
||||||
use futures::sync::mpsc::{unbounded, UnboundedReceiver};
|
use futures::sync::mpsc::{unbounded, UnboundedReceiver};
|
||||||
@ -10,7 +9,6 @@ use futures::{Async, Future, Poll, Stream};
|
|||||||
use log::{error, info};
|
use log::{error, info};
|
||||||
use net2::TcpBuilder;
|
use net2::TcpBuilder;
|
||||||
use num_cpus;
|
use num_cpus;
|
||||||
use tokio_tcp::TcpStream;
|
|
||||||
use tokio_timer::sleep;
|
use tokio_timer::sleep;
|
||||||
|
|
||||||
use crate::accept::{AcceptLoop, AcceptNotify, Command};
|
use crate::accept::{AcceptLoop, AcceptNotify, Command};
|
||||||
@ -19,7 +17,7 @@ use crate::service_config::{ConfiguredService, ServiceConfig};
|
|||||||
use crate::services::{InternalServiceFactory, ServiceFactory, StreamNewService};
|
use crate::services::{InternalServiceFactory, ServiceFactory, StreamNewService};
|
||||||
use crate::signals::{Signal, Signals};
|
use crate::signals::{Signal, Signals};
|
||||||
use crate::worker::{self, Worker, WorkerAvailability, WorkerClient};
|
use crate::worker::{self, Worker, WorkerAvailability, WorkerClient};
|
||||||
use crate::{ssl, Io, ServerConfig, Token};
|
use crate::{ssl, Token};
|
||||||
|
|
||||||
/// Server builder
|
/// Server builder
|
||||||
pub struct ServerBuilder {
|
pub struct ServerBuilder {
|
||||||
@ -166,7 +164,6 @@ impl ServerBuilder {
|
|||||||
pub fn bind<F, U, N: AsRef<str>>(mut self, name: N, addr: U, factory: F) -> io::Result<Self>
|
pub fn bind<F, U, N: AsRef<str>>(mut self, name: N, addr: U, factory: F) -> io::Result<Self>
|
||||||
where
|
where
|
||||||
F: ServiceFactory,
|
F: ServiceFactory,
|
||||||
F::NewService: NewService<ServerConfig, Request = Io<TcpStream>>,
|
|
||||||
U: net::ToSocketAddrs,
|
U: net::ToSocketAddrs,
|
||||||
{
|
{
|
||||||
let sockets = bind_addr(addr, self.backlog)?;
|
let sockets = bind_addr(addr, self.backlog)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user