def METHOD_NAME(self, tries = 10):
    """ Connect to the TRex server"""
    # need to delay and check only because TRex process might be still starting
    sys.stdout.write('Connecting')
    err = ''
    for i in range(tries):
        try:
            sys.stdout.write('.')
            sys.stdout.flush()
            self.emu_trex.METHOD_NAME() # using the STL client
            self.emu_trex.acquire(force = True)
            self.emu_trex.stop()
            print('')
            return True
        except Exception as e:
            err = e
            time.sleep(0.5)
    print('')
    print('Error connecting: %s' % err)
    return False