~ubuntu-branches/ubuntu/quantal/kdegames/quantal

« back to all changes in this revision

Viewing changes to kajongg/src/server.py

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:50 UTC
  • mfrom: (1.3.14)
  • Revision ID: package-import@ubuntu.com-20111215141750-6tj6brf4azhrt915
Tags: 4:4.7.90-0ubuntu1
new upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
735
735
            for player in suspTable.preparedGame.players:
736
736
                if player.name == user.name:
737
737
                    tableList.append(suspTable.msg())
738
 
        return tableList
 
738
        # TODO: if we return too much here, the twisted protocol cannot handle this,
 
739
        # the client will fail with a protocol error.
 
740
        # Better solution: do not transfer the rulesets, but only their hash.
 
741
        # If a client does not yet know the ruleset with this hash, the client should
 
742
        # specifically ask the server for the full ruleset definition. This should
 
743
        # significantly reduce the message size.
 
744
        # and of course, find out why twisted returns a protocol error. It should
 
745
        # rather throw a specific error about too much data, see SIZE_LIMIT (640k)
 
746
        # For now, just never return info about more than 5 tables
 
747
        return tableList[:5]
739
748
 
740
749
    def broadcastTables(self):
741
750
        """tell all users about changed tables"""