1
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2
# See LICENSE for details.
7
connectTypes = {"direct" : direct.connect,
10
def connect(host, port, options, verifyHostKey, userAuthObject):
11
useConnects = options.conns or ['unix', 'direct']
12
return _ebConnect(None, useConnects, host, port, options, verifyHostKey,
15
def _ebConnect(f, useConnects, host, port, options, vhk, uao):
18
connectType = useConnects.pop(0)
19
f = connectTypes[connectType]
20
d = f(host, port, options, vhk, uao)
21
d.addErrback(_ebConnect, useConnects, host, port, options, vhk, uao)