(self)
Connect to a host on a given (SSL) port.
Connect to a host on a given (SSL) port.
Connect to a host on a given ( SSL ) port .
def connect(self):
        "Connect to a host on a given (SSL) port."

        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.host, self.port))
        realsock = sock
        if hasattr(sock, "_sock"):
            realsock = sock._sock
        # misa: XXX x509 client-side is broken in 2.2 anyway
        ssl = socket.ssl(realsock)
        self.sock = FakeSocket(sock, ssl)
def connect ( self ) : sock = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) sock . connect ( ( self . host , self . port ) ) realsock = sock if hasattr ( sock , "_sock" ) : realsock = sock . _sock # misa: XXX x509 client-side is broken in 2.2 anyway ssl = socket . ssl ( realsock ) self . sock = FakeSocket ( sock , ssl )