Connect a protocol instance to an endpoint.

This allows using a client endpoint without having to create a factory.

ParametersendpointA client endpoint to connect to.
protocolA protocol instance.
ReturnsThe result of calling connect on the endpoint, i.e. a Deferred that will fire with the protocol when connected, or an appropriate error.
Present Since13.1
API Documentation for Twisted, generated by pydoctor at 2017-09-23 19:45:03.