'Receive line commands from the server.'

def lineReceived(self, line):

    self.resetTimeout()
    token = line.split('    ', 1)[0]
    cmd = getattr(self, ('cmd_' + nativeString(token)), None)
    if (cmd is not None):
        args = line.split('    ', 1)[1:]
        if args:
            cmd(args[0])
        else:
            cmd()
    else:
        line = line.replace('    ', '_')
        cmd = getattr(self, ('cmd_' + nativeString(line)), None)
        if (cmd is not None):
            cmd()
        else:
            cmd = self._current.popleft()
            val = int(line)
            cmd.success(val)
    if (not self._current):
        self.setTimeout(None)
