diff --git a/actix-connect/src/connect.rs b/actix-connect/src/connect.rs index 92be3fa6..7b522929 100644 --- a/actix-connect/src/connect.rs +++ b/actix-connect/src/connect.rs @@ -77,6 +77,11 @@ impl Connect<(String, u16)> { } impl Connect { + /// Create new `Connect` instance. + pub fn with_request(req: T) -> Connect { + 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 { Connect {