'Connect to host.  Arguments are:
- host: hostname to connect to (string, default previous host)
- port: port to connect to (integer, default previous port)
- timeout: the timeout to set against the ftp socket(s)
- source_address: a 2-tuple (host, port) for the socket to bind
to as its source address before connecting.'

def connect(self, host='', port=0, timeout=(-999), source_address=None):

    if (host != ''):
        self.host = host
    if (port > 0):
        self.port = port
    if (timeout != (-999)):
        self.timeout = timeout
    if (source_address is not None):
        self.source_address = source_address
    self.sock = socket.create_connection((self.host, self.port), self.timeout, source_address=self.source_address)
    self.af = self.sock.family
    self.file = self.sock.makefile('r', encoding=self.encoding)
    self.welcome = self.getresp()
    return self.welcome
