def run(self): error, result = winsockbtooth.connect(deviceID = self.deviceID) if error == False: winsockbtooth.closesocket(result) winsockbtooth.WSACleanup() self.callback(error,result) return
def terminate(self): self.running = False if self.socket != None: winsockbtooth.closesocket(self.socket)