''

def connect(self, userID, password, brokerID, address):

    self.userID = userID
    self.password = password
    self.brokerID = brokerID
    self.address = address
    if (not self.connectionStatus):
        path = (os.path.dirname(os.path.abspath(__file__)) + '\\tdconnection\\')
        if (not os.path.exists(path)):
            os.makedirs(path)
        self.createFtdcTraderApi(path)
        self.subscribePrivateTopic(1)
        self.subscribePublicTopic(1)
        self.registerFront(self.address)
        self.init()
    elif (not self.loginStatus):
        self.login()
