mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 21:10:37 +02:00
Connect::set_addr()
This commit is contained in:
@ -69,6 +69,14 @@ impl<T: Address> Connect<T> {
|
||||
self
|
||||
}
|
||||
|
||||
/// Use address.
|
||||
pub fn set_addr(mut self, addr: Option<SocketAddr>) -> Self {
|
||||
if let Some(addr) = addr {
|
||||
self.addr = Some(Either::Left(addr));
|
||||
}
|
||||
self
|
||||
}
|
||||
|
||||
/// Host name
|
||||
pub fn host(&self) -> &str {
|
||||
self.req.host()
|
||||
|
Reference in New Issue
Block a user