Beispiel #1
0
        line = line.split()
        if line[0] ==  "joinServer":
            serverId = int(line[1])
            """
            Start up a new server with this id and connect it to all servers
            """
            api.joinServer(serverId)

        if line[0] ==  "retireServer":
            serverId = int(line[1])
            """
            Retire the server with the id specified. This should block until
            the server can tell another server of its retirement
            """
            api.retireServer(serverId)

        if line[0] ==  "joinClient":
            clientId = int(line[1])
            serverId = int(line[2])
            """
            Start a new client with the id specified and connect it to
            the server
            """
            api.joinClient(clientId, serverId)

        if line[0] ==  "breakConnection":
            id1 = int(line[1])
            id2 = int(line[2])
            """
            Break the connection between a client and a server or between