示例#1
0
            """
            Print out a server's operation log in the format specified in the
            handout.
            """
            api.printLog(serverId)

        if line[0] ==  "put":
            clientId = int(line[1])
            songName = line[2]
            URL = line[3]
            """
            Instruct the client specified to associate the given URL with the given
            songName. This command should block until the client communicates with
            one server.
            """
            api.put(clientId, songName, URL)

        if line[0] ==  "get":
            clientId = int(line[1])
            songName = line[2]
            """
            Instruct the client specified to attempt to get the URL associated with
            the given songName. The value should then be printed to standard out of
            the master script in the format specified in the handout. This command
            should block until the client communicates with one server.
            """
            api.get(clientId, songName)

        if line[0] ==  "delete":
            clientId = int(line[1])
            songName = line[2]