mirror of
https://github.com/fafhrd91/actix-net
synced 2025-03-15 13:13:05 +01:00
add Connect::with_request
This commit is contained in:
parent
a7c74c53ea
commit
084a28ca07
@ -77,6 +77,11 @@ impl Connect<(String, u16)> {
|
||||
}
|
||||
|
||||
impl<T: Address> Connect<T> {
|
||||
/// Create new `Connect` instance.
|
||||
pub fn with_request(req: T) -> Connect<T> {
|
||||
Connect { req, addr: None }
|
||||
}
|
||||
|
||||
/// Create new `Connect` instance from host and address. Connector skips name resolution stage for such connect messages.
|
||||
pub fn with_address(req: T, addr: SocketAddr) -> Connect<T> {
|
||||
Connect {
|
||||
|
Loading…
x
Reference in New Issue
Block a user