twisted.internet.endpoints.connectProtocol(endpoint, protocol) function documentationtwisted.internet.endpoints
View Source
Connect a protocol instance to an endpoint.
This allows using a client endpoint without having to create a factory.
| Parameters | endpoint | A client endpoint to connect to. |
| protocol | A protocol instance. | |
| Returns | The result of calling connect on the endpoint, i.e. a Deferred that
will fire with the protocol when connected, or an appropriate error. | |
| Present Since | 13.1 | |