1 # Copyright (c) Twisted Matrix Laboratories.
2 # See LICENSE for details.
7 connectTypes = {"direct" : direct.connect}
9 def connect(host, port, options, verifyHostKey, userAuthObject):
10 useConnects = ['direct']
11 return _ebConnect(None, useConnects, host, port, options, verifyHostKey,
14 def _ebConnect(f, useConnects, host, port, options, vhk, uao):
17 connectType = useConnects.pop(0)
18 f = connectTypes[connectType]
19 d = f(host, port, options, vhk, uao)
20 d.addErrback(_ebConnect, useConnects, host, port, options, vhk, uao)