Part of twisted.internet.protocol View Source View In Hierarchy
Client connections that do not require a factory.
The various connect* methods create a protocol instance using the given protocol class and arguments, and connect it, returning a Deferred of the resulting protocol instance.
Useful for cases when we don't really need a factory. Mainly this is when there is no shared state between protocol instances, and no need to reconnect.The
connectSSLmethods each return a
Deferredwhich will fire with an instance of the protocol class passed to
ClientCreator.__init__. These Deferred can be cancelled to abort the connection attempt (in a very unlikely case, cancelling the Deferred may not prevent the protocol from being instantiated and connected to a transport; if this happens, it will be disconnected immediately afterwards and the Deferred will still errback with
|Method||connectTCP||Connect to a TCP server.|
|Method||connectUNIX||Connect to a Unix socket.|
|Method||connectSSL||Connect to an SSL server.|
|Method||_connect||Initiate a connection attempt.|
|Parameters||method||A callable which will actually start the connection attempt. For
|*args||Positional arguments to pass to |
|**kwargs||Keyword arguments to pass to |
Connect to a TCP server.The parameters are all the same as to
IReactorTCP.connectTCPexcept that the factory parameter is omitted.
Connect to a Unix socket.The parameters are all the same as to
IReactorUNIX.connectUNIXexcept that the factory parameter is omitted.
Connect to an SSL server.The parameters are all the same as to
IReactorSSL.connectSSLexcept that the factory parameter is omitted.