mirror of
https://github.com/fafhrd91/actix-net
synced 2025-02-17 14:43:31 +01:00
create Connector with custom Resolver
This commit is contained in:
parent
88d8c99e31
commit
d8ed9ae43a
@ -63,6 +63,16 @@ impl<T: HostAware> Connector<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn with_resolver(
|
||||||
|
resolver: Resolver<T>,
|
||||||
|
) -> impl Service<
|
||||||
|
Request = T,
|
||||||
|
Response = (T, ConnectionInfo, TcpStream),
|
||||||
|
Error = ConnectorError,
|
||||||
|
> + Clone {
|
||||||
|
Connector { resolver }
|
||||||
|
}
|
||||||
|
|
||||||
pub fn new_service<E>() -> impl NewService<
|
pub fn new_service<E>() -> impl NewService<
|
||||||
Request = T,
|
Request = T,
|
||||||
Response = (T, ConnectionInfo, TcpStream),
|
Response = (T, ConnectionInfo, TcpStream),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user