def connectSocket(self):
        host, port = self.local.hostport
        if hasattr(host, 'resolve'):
            host = host.resolve()[0]
        sock = socket.socket(host.family, socket.SOCK_STREAM)
        sock.settimeout(self.connectTimeout)
        sock.connect((str(host), port))
        return sock
Open a connection to the proxy, or endpoint if no proxy.
dataset/ETHPy150Open sassoftware/conary/conary/lib/http/connection.py/Connection.connectSocket